You need to sign in to do that
Don't have an account?
this code is for dependend pick list using passing parameter in api. I need to do is using J query how to implement and by default value will be all category list in picklist.
this code is for dependend pick list using passing parameter in api.
I need to do is using J query how to implement and by default value will be all category list in picklist.
Visualforce code :-
I need to do is using J query how to implement and by default value will be all category list in picklist.
Visualforce code :-
<apex:page controller="categories" readOnly="true"> <apex:form id="FormB"> <script> function myJavaMethod(){ myactionfun(); } </script> <script> function myJavaMethod1(){ myactionfun1(); } </script> <!-- <apex:actionFunction name="myactionfun" action="{!getperformcalloutpageReference}" reRender="testPanel"/>--> <!-- <apex:actionFunction name="myactionfun1" action="{!getcompanypageReference }" reRender="testPanel1"/>--> <apex:outputPanel id="testPanel12"> <apex:pageBlock > <apex:pageblockSection columns="3" > <apex:pageBlock > <apex:selectList size="1" value="{!PartnerId}" id="PartnerId" onchange="myJavaMethod1(); return false;"> <apex:selectOptions value="{!company}" /> <apex:actionSupport event="onchange" > </apex:actionSupport> </apex:selectList> </apex:pageBlock> </apex:outputPanel> <apex:outputPanel id="testPanel1"> <apex:pageBlock > <apex:selectList size="1" value="{!ContentCategoryId}" id="ContentCategoryId" onchange="myJavaMethod(); return false;" > <apex:selectOptions value="{!items}" /> <apex:actionSupport event="onchange"> </apex:actionSupport> </apex:selectList> </apex:pageBlock> </apex:outputPanel> <apex:outputPanel id="testPanel"> <apex:pageblock id="pgBlock2"> <!-- <c:PageBlockTableEnhancerADV targetPbTableIds="a" pageSizeOptions="5,10,15,30,40,50,60,70" defaultPageSize="50" enableExport="false"/> --> <apex:pageBlockTable id="a" value="{!performcallout}" var="wrap" width="100%" rendered="{!normalList}"> <apex:column headerValue="Title" value="{!wrap.Title}"/> <apex:column > <apex:inputCheckbox value="{!wrap.selected}" > </apex:inputCheckbox> </apex:column> </apex:pageBlockTable> </apex:pageBlock> </apex:outputPanel> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
There are quite a few examples out there that demonstrate this if you google for them. You dont necessarily need jQuery to implement dependent picklists. You could simple use apex:inputField with dependent fields and it should work fine. Otherwise, you could use a series of selectLists and rerendering such as this example: http://www.infallibletechie.com/2012/10/dependent-picklist-using-apex-in.html. Last, you could go the JS route, and implement something similar to: https://iwritecrappycode.wordpress.com/tag/picklist-js/