You need to sign in to do that
Don't have an account?
vishesh91
post all values in select list to a variable
I want to set a array variable in controller from the values of select list.
controller:
public String[] searchFields= new String[]{}; public String[] getSearchFields() { return searchFields; } public void setSearchFields(String[] searchFields) { this.searchFields = searchFields; }
visualforce :
<apex:selectList value="{!searchFields}> <apex:selectoptions value="{!options}" /> </apex:selectList>
but this does not post all the values of selectList in controller's searchFields variable.
options list is populated by getOptions method in controller.and yes values in searchFields list is modified by javascript on client end.Please help
why don't you just create a multi select picklist
i u need i can share complete code with u
actually user will not select any value,but still all values in list must be posted back to controller
requirments are like this
the add and remove button triggers javascript to move values from one list to other.on save all values in right side list must be posted to a array variable in controller.
I hope question is more clear now.Any Ideas will be og great help
Thanks
You are using Javascript to move the values from left to right
so why don't u just create a comma saparate string within javascript & pass it back to controler using param or Hidden input fields