You need to sign in to do that
Don't have an account?
Karina 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
<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
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
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?