I wanted to save some multiselected values stored in a custom setting and then retrieve the value and display as selected in the selectList.
The first option of saving the value in custom setting is working but i am not sure how we can get the values as selected.
Any pointers on how this can be done would be a great help.
<apex:pageBlockSectionItem id="pbsiStatus">
<apex:outputlabel value="Don’t Show Leads with Status" id="lblStatus" />
<apex:selectList id="selectStatus" value="{!cls.Dont_Show_Lead_With_Status__c}" multiselect="true" styleClass="convstatus" >
<apex:selectOptions value="{!statusList}"/>
</apex:selectList>
</apex:pageBlockSectionItem>
The saved value is stored as [Closed - Converted, Working - Contacted]
Update:
As suggested by @Keith, i am changing the way to store in the custom setting as Working - Contacted; Open - Not Contacted
by removing the "[" and "]" and delimiter as semi-colon instead of comma.
I still cant see the values as default selected when i view the VF page.
Update 2: If i select just 1 item from the selectList then i can see the value is selected. But there is no selection if more than one option is selected.