function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Karina ChangKarina Chang 

attribute on controller class

Hi, I am trying to create a Visualforce page to use multiplicklist on contacts - 

<apex:page controller="MultiselectExampleController">
    <apex:form >
        <apex:pageBlock title="Contacts">
            <c:MultiselectPicklist leftLabel="Available Contacts"
                leftOptions="{!allContacts}"
                rightLabel="Selected Contacts"
                rightOptions="{!selectedContacts}"
                size="14"
                width="150px"/>
            <apex:pageBlockButtons >
                <apex:commandButton value="Save" action="{!save}"/>
            </apex:pageBlockButtons>
        </apex:pageBlock>
    </apex:form>
    <apex:outputText >{!message}</apex:outputText>
</apex:page>

However, it is given me an error: Error: Wrong type for attribute <c:multiselectpicklist leftoptions="{!allContacts}">. Expected String, found SelectOptionValue
Not sure what I am missing
ShivaKrishna(Freelancer)ShivaKrishna(Freelancer)
Hi there,

I donno exactly why you are going for using visualforce component in your page but using multi picklist below approach is better.

<apex:selectList value="{!nextStageSelection}" multiselect="true" size="1"  label="Next Stage" >                      
                        <apex:selectOptions value="{!StageItems}"/>
                    </apex:selectList>

let me know, if it helps you or need any help :)
shiva.sfdc.backup@gmail.com
Karina ChangKarina Chang
The idea is to have a Custom Object associated with many contacts - 
Initially, I was hoping to replicate the lookup functionality when creating a Task. There is a Contact lookup, when you click on it, it displays a multiselect and then the names are displayed on the Contact field separated by commas.
Is this even possible?