Dependent picklist displays 'null' when rerendering with immediate="true"
Last updated 2016-12-08 ·Reference W-2615397 ·Reported By 40 users
Summary
"null" is shown up in dependent picklist when re-rendering with immediate="true".
Repro
1. Create a custom picklist field to Opportunity
Name : Test
Data Type : Picklist
Picklist Values : Any strings
2. Configure Field Dependency
Controlling Field : Stage
Dependent Field : the created custom picklist field at Step 1
3. Create the following Apex controller class
---
public class PicklistTest
{
public Opportunity o {get;set;}
public PicklistTest()
{
this.o = new Opportunity();
}
public PageReference myAction() {
return null;
}
}
---
4. Create the following Visualforce page
Name : PicklistTestPage
---
<apex:page title="Dependent Picklist" controller="PicklistTest">
<apex:form >
<apex:outputPanel id="panel1">
<apex:pageBlock >
<apex:inputField value="{!o.StageName}">
<apex:actionSupport event="onchange" action="{!myAction}" rerender="panel1" immediate="true"/>
</apex:inputField>
<apex:inputField value="{!o.Test__c}" />
</apex:pageBlock>
</apex:outputPanel>
</apex:form>
</apex:page>
---
5. Access the following Visualforce page
You will see the first select box is active and the second select box is inactive.
6. Select any record in the first select box
You will see the second select box has "null". This is unexpected.
Workaround
Use immediate="false"
Reported By (40)



























Is it Fixed?
Any unreleased services, features, statuses, or dates referenced in this or other public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.