I have the following multi-select picklist code in my Visualforce page
<apex:selectList styleClass="form-control evemin" id="testid" size="3" multiselect="true" value="{!testVariable}" >
<apex:selectOption itemLabel="test1" itemValue="test1"/>
<apex:selectOption itemLabel="test2" itemValue="test2"/>
<apex:selectOption itemLabel="test3" itemValue="test3"/>
</apex:selectList>
testvariable is a String array variable in my apex class. Is this a proper way to pass the value in Controller. What I can see is that it does not take the selected option to Apex class in this process. Is there any other way to do this
Best Answer
Refer this link apex:selectList, which is the correct way to handle multi-select picklist
Controller