You need to sign in to do that
Don't have an account?

How to get selected value from multiselect picklist to controller
<apex:form >
<apex:actionRegion >
<apex:selectList value="{!objClass.Class_Meets__c}" multiselect="true">
<apex:selectOptions value="{!items}"/>
</apex:selectList>
<apex:inputField value="{!objClass.Class_Meets__c}">
<apex:actionSupport event="onchange" action="{!showPanel}" rerender="panel">
<apex:param value="{!objClass.Class_Meets__c}" name="classmeets" assignTo="{!classmeets}"/>
</apex:actionSupport>
</apex:inputField>
</apex:actionRegion>
<apex:outputPanel id="panel">
<apex:outputPanel rendered="{!flag}">
{!objClass.Class_Meets__c}
{!classmeets}
</apex:outputPanel>
</apex:outputPanel>
</apex:form>
where "classmeets" is string. I am not able to get the currently selected picklist value in controller. {!objClass.Class_Meets__c} displays the selected values but "classmeets" come null.
You cannot modify the same inputfield again. You need to built custom selectlist and custom button. Using the index and some custom logic it can be possible.
Regards,
Ajay
All Answers
Can you provide more details about the problem ?
Why you have included first selectlist in action region ? Can you take it out if not required ?
Regards,
Ajay
Hi,
Thank you for the response. Your suggestion helped me :)
I would like to know if we can get the currently selected pcklist value (in Multiselect picklist). Above code gives all previously selected values also but I want only newly selected value.
Thank you.
You cannot modify the same inputfield again. You need to built custom selectlist and custom button. Using the index and some custom logic it can be possible.
Regards,
Ajay