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
MaxFrielMaxFriel 

An error occurred when processing your submitted information

I have a selectList setup like this...

<apex:selectList rendered="{!IF(aci['Type__c'] == 'PICKLIST','true','false')}" label="{!aci['Field_Label__c']}" value="{!plv[aciId + '.' + aci['Field_Name__c']]}" size="1" multiselect="false">
  <apex:selectOptions value="{!plvVals[aci['Object_Name__c'] + '.' + aci['Field_Name__c']]}"/>
</apex:selectList>

 The goal is that I have a dynamic series of selectLists that write back to a map.  Plv is simply a map of string,string.  When I go to display this if there is a value in the map it properly selects it, however when I go to save I get the error "An error occurred when processing your submitted information".  I put a debug line in the first line of my save code in apex and that never gets printed, so it never even makes it to the save statement.  Is what I am trying to do just not possible, thoughts? 

S91084S91084

The value attribute used in the <apex:selectList> must be a variable and it hold the value the user selects from the drop-down. define a variable in the controller with getter and setter and then use that variable to form how you would like to in the controller

 

public String selectedValue {get;set;}

 

<apex:selectList rendered="{!IF(aci['Type__c'] == 'PICKLIST','true','false')}" label="{!aci['Field_Label__c']}" value="{!selectedValue}" size="1" multiselect="false">
  <apex:selectOptions value="{!plvVals[aci['Object_Name__c'] + '.' + aci['Field_Name__c']]}"/>
</apex:selectList>
MaxFrielMaxFriel

The selectList is setup in a apex:repeat...

<apex:repeat value="{!newFields[aciId]}" var="aci">
 <apex:inputField rendered="{!IF(aci['Type__c'] == 'PICKLIST' || aci['Type__c'] == 'MULTIPICKLIST','false','true')}" label="{!aci['Field_Label__c']}" value="{!aci[fldLookup[aci['Type__c']]]}"/> 
 <apex:selectList rendered="{!IF(aci['Type__c'] == 'PICKLIST','true','false')}" label="{!aci['Field_Label__c']}" value="{!plv[aciId + '.' + aci['Field_Name__c']]}" size="1" multiselect="false">
  <apex:selectOptions value="{!plvVals[aci['Object_Name__c'] + '.' + aci['Field_Name__c']]}"/>
 </apex:selectList>
 <apex:selectList rendered="{!IF(aci['Type__c'] == 'MULTIPICKLIST','true','false')}" label="{!aci['Field_Label__c']}" value="{!plvMS[aciId + '.' + aci['Field_Name__c']]}" size="5" multiselect="true">
  <apex:selectOptions value="{!plvVals[aci['Object_Name__c'] + '.' + aci['Field_Name__c']]}"/>
 </apex:selectList>
</apex:repeat>

 How can I achieve this?

GLemGLem

Hi,

 

Did you find a solution to your problem ? I have the same issue with checkboxes in a <apex:repeat> block...

 

Thanks