+ Start a Discussion
Sandeep001Sandeep001 

actionSupport inside selectList

Hi,

 

Please have a look at this code:-

 

 <apex:panelGrid id="selectAdd">                                   
                                       
            <apex:selectList id="fld1" value="{!selectedVal}" multiselect="false" size="1" >                                            

              <apex:selectOptions id="selectAddOption" value="{!addressOptions}"/>      
                     <apex:actionSupport event="onselect" action="{!pickListProcess} rerender="errorPanel,     

                          addressPanel" status="SearchStatus immediate="true"/>                                                     
            

            </apex:selectList>                    
  </apex:panelGrid>  

 

 I am trying to obtain the value of selected picklist option (selectedVal ) in controller method - pickListProcess. But i always get it as null... anyother way to achieve this?

 

Thanks in anticipation...

 

Best Answer chosen by Admin (Salesforce Developers) 
Sandeep001Sandeep001

i found out the issue. There was problem with the picklists' label and value strings which I was populating in my controller class. 

All Answers

Sandeep001Sandeep001

I can see this error in my error logs:- 

 

j_id0:j_id1:form1:fldName: Validation Error: Value is not valid

 

TehNrdTehNrd
In your controller or extension what is: selectedVal ? May also want to change the event to onchange.
Message Edited by TehNrd on 07-23-2009 01:55 PM
Sandeep001Sandeep001

i found out the issue. There was problem with the picklists' label and value strings which I was populating in my controller class. 

This was selected as the best answer
n1009n1009

hii..

Even i also face same problem.can u elobaorate ur solution which u write in solution.

what problem u had in picklist label and string values.

 

thanks