You need to sign in to do that
Don't have an account?
How to add one selectlist values to another selectlist
hi i am trying to tranfer values between two different selectLists. but i have not getting any idea.
Please help me.
<apex:page >
<apex:form >
<table>
<tr>
<td>
<apex:selectList multiselect="true" SIze="1">
<apex:selectOption ItemValue="ONE" ></apex:selectOption>
<apex:selectOption ItemValue="TWO" ></apex:selectOption>
<apex:selectOption ItemValue="THREE"></apex:selectOption>
<apex:selectOption ItemValue="FOUR"></apex:selectOption>
</apex:selectList>
</td>
<td>
<apex:panelGrid >
<apex:commandButton value="Add"/>
<apex:commandButton value="Remove"/>
<apex:commandButton value="up"/>
<apex:commandButton value="Down"/>
</apex:panelGrid>
</td>
<td>
<apex:selectList multiselect="true">
</apex:selectList>
</td>
</tr>
</table>
</apex:form>
</apex:page>
It gets stored in whatever variable you specify in your Controller,
http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_compref_selectList.htm|StartTopic=Content%2Fpages_compref_selectList.htm|SkinName=webhelp
All Answers
Just have your controller grab the selected values from the first list and put it into the second list on a button press or something similar.
how to grab selected values
It gets stored in whatever variable you specify in your Controller,
http://www.salesforce.com/us/developer/docs/pages/index_Left.htm#CSHID=pages_compref_selectList.htm|StartTopic=Content%2Fpages_compref_selectList.htm|SkinName=webhelp