1

I've been coding a visualforce page and have hit a hitch. I have 5 picklists: I have one normal picklist, a dependent picklist on the normal one, and three separate dependent picklists which depend on the first dependent picklist. The following snippet is from my page.

<apex:column headerValue="New Stage">
  <apex:inputField value="{!op.StageName}"/>
</apex:column>
<apex:column headerValue="Reason for Closing">
  <apex:inputField value="{!op.Closed_Reason__c}">
    <apex:actionSupport event="onchange" rerender="further"/>
  </apex:inputField>
</apex:column>

<apex:column width="100px" headerValue="Further Options" id="further">
  <apex:inputField value="{!op.Decline_Codes__c}" rendered="{!op.Closed_Reason__c == "Decline"}"/>
  <apex:inputField value="{!op.Ineligible_Reason__c}" rendered="{!op.Closed_Reason__c == "Ineligible"}"/>
  <apex:inputField value="{!op.Withdrawn_Reason__c}" rendered="{!(op.Closed_Reason__c == "Withdrawn")}"/>
</apex:column>

The rendering code works fine, but the three picklists show up empty when the corresponding picklist option is selected. Observe:

Failing to load values

Similarly if one chooses ineligible an empty picklist appears, and finally for declined an empty multi-select picklist appears.

Any thoughts on what could be causing this?

  • Have you checked field level security for those particular fields to ensure that your user has access to them? – Mark Pond Nov 25 '14 at 22:38
  • 1
    I have. Turns out I lied, it was the rendering code that caused this code to break. Apparently one cannot use this method of hiding the further options until an option is selected. Removing the rerendering code fixed my issue. – Nick Taber Nov 25 '14 at 22:53
1

This was actually due to the rendering code, which I thought worked but didn't. Apparently rerendering on change of the first dependent picklist restricts the subdependent picklists from populating. Removing the rendering code fixed the issue.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.