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

Dependency Picklist Rerender Issues
Hello,
Account_Review__c has three picklist fields, and there are dependency rules defined between them, so options for one field, depends on whats selected in the other.
I am tryign to display the values of these three fields, in a pageblock. But its causing multiple rerenders, because of dependency picklists, and therefore showing wrong results.
Ex. I set values in three fields, and then if i change the first picklist value, the values in second and third picklist shows NULL (per dependency rules) in the dropdown, but doesnt show NULL when i am printing in the page block. See attached images.
What should i do so the values in pageblock, alwasy show the correct picklist values, after rerender. Thanks.

Account_Review__c has three picklist fields, and there are dependency rules defined between them, so options for one field, depends on whats selected in the other.
I am tryign to display the values of these three fields, in a pageblock. But its causing multiple rerenders, because of dependency picklists, and therefore showing wrong results.
Ex. I set values in three fields, and then if i change the first picklist value, the values in second and third picklist shows NULL (per dependency rules) in the dropdown, but doesnt show NULL when i am printing in the page block. See attached images.
What should i do so the values in pageblock, alwasy show the correct picklist values, after rerender. Thanks.
<apex:page standardController="Account_Review__c"> <apex:form> <apex:pageBlock> <apex:inputfield value="{!Account_Review__c.Reason__c}" id="f1"> <apex:actionSupport event="onchange" reRender="Block1"/> </apex:inputField> <apex:inputfield value="{!Account_Review__c.Result__c}" id="f2"> <apex:actionSupport event="onchange" reRender="Block1"/> </apex:inputField> <apex:inputfield value="{!Account_Review__c.Action__c}" id="f3"> <apex:actionSupport event="onchange" reRender="Block1"/> </apex:inputField> </apex:pageBlock> <apex:pageBlock id="Block1"> <apex:outputLabel >{!Account_Review__c.Reason__c}</apex:outputLabel><BR/> <apex:outputLabel >{!Account_Review__c.Result__c}</apex:outputLabel><BR/> <apex:outputLabel >{!Account_Review__c.Action__c}</apex:outputLabel><BR/> </apex:pageBlock> </apex:form> </apex:page>
this is because you are rerendering the whole pageblock in place of the rerendering the whole pageblock just rerender single inputtype field.
Thanks
Gyani