function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDummySFDummy 

Picklist selected value NULL

I have two picklist in custom object and a checkbox

Posters__c 
5
10
25
50
Brochures__c
50
100
150
200
isPoster__c ( this is trrue show poster picklist)

Here are my two code lines
<apex:inputField value="{!v.brform.Brochures__c}" rendered="{!(!v.brform.IsPoster__c)}"/> 
 <apex:inputField value="{!v.brform.Posters__c}" rendered="{!(v.brform.IsPoster__c)}"/>
Problem: selected value of Brochures__c is always null
Poster__c selected value is working
I have this custom object in a wrapper class. On the visualforce page I see correct display of picklist based on the "isPoster__c"  flag. But in the controller when I check selected value Posters__c is correct.  But Brochures__c is always null. 
Any tips on how I can solved this problem?



Ramu_SFDCRamu_SFDC
Please post the controller code as well. I guess the set method is not implemented correctly hence it is always showing null.
SFDummySFDummy
Custom object: Brochures_web__c
Fields: IsPoster (Boolean) BR_Posters__C (picklist) BR_Brochures__c(Picklist) BR_Lang_English__c (checkbox) BR_Lang_Russian__c(checkbox)

partial class code:
//new list with items expanded wrapperclass
    public class brochuresForm{
         public String brwlang {get; set;}
         public brochures_web__c brform{get; set;}  //my custom object with two picklist
         
         public brochuresForm(String l, brochures_web__c bw){
           brwlang = l;
           brform = bw;
         }
      } 
  public List <brochuresForm> brformLst  {get{return brformLst;} set{brformLst = value;}}    
  public pageReference onLoad(){ 
          
          brformLst = getWrapperList(brWebDataLst);
          return null;
    }
  public List<brochuresForm> getwrapperList (List<Brochures_Web__c> bwlist){
         List<brochuresForm> tempList = new List<brochuresForm> ();
     for(Brochures_web__c d: bwList){ system.debug(d);
         if(d.BR_Lang_English__c) tempList.add(new brochuresForm('English',d));
         if(d.BR_Lang_Russian__c) tempList.add(new brochuresForm('Russian',d));
         if(d.BR_Lang_Spanish__c) tempList.add(new brochuresForm('Spanish',d));
        
     }
     return tempList;
 }

page code:
my page code
 <apex:repeat value="{!brformLst}" var="v"> 
              <apex:outputText value="{!v.brwlang}"/> <apex:inputField value="{!v.brform.BR_brochures__c}"  rendered="{!(!v.brform.IsPoster__c)}"/>
              <apex:inputField value="{!v.brform.BR_Posters__c}" rendered="{!(v.brform.IsPoster__c)}" /> <br/>
          </apex:repeat>

I have list of Lists  of another wrapper class " public list<list<brExtData>>"   List of above wrapper class "public List <brochuresForm> brformLst" is part of the list of Lists