1

For some reason, my multiselect box has no 'Chosen' side:

select list

Here's my VF selectlist component:

<apex:selectList value="{!selContact}" label="Contact Name" size="3" multiselect="true"
                rendered="{!$CurrentPage.parameters.objType='account' && $CurrentPage.parameters.isPerson != '1'}">
     <apex:selectOptions value="{!contacts}"></apex:selectOptions>
</apex:selectList>

I'm populating it from a class extension:

public List<SelectOption> getContacts()
{
    ..... other code

    for (Contact cnt : allContacts) 
    {
        options.add(new SelectOption(cnt.Id, cnt.Name));
    }

    return options; 
}

Anyone seen this before?

1 Answer 1

3

The <apex:selectList /> tag doesn't render two lists like some of the native pages in the Salesforce UI do when making selections from a list of choices.

To make multiple selections you use the Ctrl or Command ⌘ key and click on multiple items from the list.


You can use something like this from our very own @metadaddy to allow you to create this side-by-side picklist in a VF page.

https://github.com/metadaddy-sfdc/Visualforce-Multiselect-Picklist

1
  • Ahh. Well that would explain it. Feelin pretty silly. Thanks for the explanation @Mark.
    – Adam H.
    Jun 16, 2014 at 13:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .