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
Sandy singhSandy singh 

save or back button not working with use of Map which return value as List <Selection>

Hi,

 

can anyone help me why save or back button not working with use of Map 'groupNameAndOptionMap' which return value as List <SelectOption>(red colour code). Same code working if using List<SelectOption>..

 

Below are the code:

 

<apex:commandButton Value="Save" action="{!saveData}"  rerender="pageBlockId" style="float:right" />
<apex:commandButton value="Back to Home" action="{!navigateBack}" style="float:right" />
<apex:variable var="sameCategory" value=""/>
<apex:pageblockTable value="{!studentList}" var=std >
    <apex:column width="5%" >
         <apex:facet name="header">Name</apex:facet>
         <apex:outputText value="{!std .name__}"  />
        <apex:variable var="sameCategory" value="{!std.category_name__c}" />
    </apex:column>
  
 <apex:column headerValue="Student Selection">
    <apex:selectList value="{!std.student_selection__c}" title="Choose a Section" id="listId" size="1">
        <apex:selectOptions value="{!groupNameAndOptionMap[sameGroup]}" />
    </apex:selectList>
 </apex:column>
</apex:pageblockTable >

 

 

Thanks in advance

 Sandy

 

Avidev9Avidev9

Sandy,

Can you try the same by commenting the selectList section  with the map in place?

 

 

Sandy singhSandy singh

Hi Avi,

 

Thanks for your responce.

 

 This code worked when i am using wrapper class and insted of map value as a List<SelectOption> directly using wrapper class list of type SelectOption, but i want to know this is the problem with salesforce or anything else?

 

 

Thank,

Sandesh