+ Start a Discussion
Eric_SalesForceEric_SalesForce 

SelectList not saving the SelectOption

I have a selectList and have populated it from the Apex Controller. I have the list displaying correctly on the Visualforce page however when a user tries to select an option from the selectList and then save, it doesn't save the value. I also need the selectList to display the option that has been saved previously. How do I make sure that the field of an object gets set from the selectlist and how can i make the selectlist display the correct option depending on the field of the object?

thanks,
Sonam_SFDCSonam_SFDC
When you say the value isn't saving do you mean the value isn't passing from the visualforce page to the controller..

Have you used the value attribute of apex:selectList and created a variable in the controller to capture that value from the visualfforce page to the controller

<apex:selectList value="{!countries}" multiselect="true">

Please share your code and also elaborate a bit on your issue so that we can  understand better