You need to sign in to do that
Don't have an account?
Gheorghe Sima 25
Multiselect picklist component in visualforce
Hi,
I have 2 multiselect picklist component in a visualforce page and when the user modifies the first multiselect picklist I want to change the value from the second multiselect picklist. I want to make a dependency between those 2 picklist multiselect, but my code doesn't work...
Here is my code:
Can anyone help me?
I have 2 multiselect picklist component in a visualforce page and when the user modifies the first multiselect picklist I want to change the value from the second multiselect picklist. I want to make a dependency between those 2 picklist multiselect, but my code doesn't work...
Here is my code:
<apex:page standardStylesheets="true" controller="NewAccountAPVController2" tabStyle="Account"> <apex:param id="accountID" name="accountID" value=""/> <apex:pageMessages /> <apex:form > <script type="text/javascript"> function navigate(){ searchServer(); } </script> <apex:actionFunction name="searchServer" action="{!RefreshMultiSelect}" rerender="results"> </apex:actionFunction> <apex:pageBlock title="New Account"> <apex:pageBlockButtons > <apex:commandButton action="{!cancel}" value="Cancel" styleClass="btn"/> <apex:commandButton action="{!savePage21}" value="Save" styleClass="btn"/> </apex:pageBlockButtons> <apex:pageBlockSection title="Subcategorie" columns="1"> <c:MultiselectPicklist leftLabel="Subcategorii" leftOptions="{!subcategory}" rightLabel="Subcategorii selectate" rightOptions="{!selectedSubcategory}" size="15" width="300px" onchange="navigate();" /> </apex:pageBlockSection> <apex:pageBlockSection title="Subsubcategorie"> <c:MultiselectPicklist leftLabel="Subsubcategorii" leftOptions="{!subsubcategory}" rightLabel="Subsubcategorii selectate" rightOptions="{!selectedSubSubCategory}" size="15" width="300px" id="results" /> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
Can anyone help me?
There are 2 ways to acheive dependent picklist
1-> Controller
2-> Adding Dependent Fields
Sample example: Another Way :
http://www.infallibletechie.com/2012/10/dependent-picklist-using-apex-in.html
Adding Dependent Fields :
https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_quick_start_dependent_picklists.htm
Thanks
Swetha
Did you got solution for this. How to use onchange attribute in c:MultiselectPicklist component?