I am trying to reset a dependent multi-select picklist(Narrative_of_Type__c) on change of a picklist(Case_Type__c) value in a VF page. But I am not able to reset(i.e. removing the selected values) it when a I select a different value from the master picklist. Whereas I tried for a independent multiselect picklist which gets nullified with the same logic in controller. Any reason for this ?
Given below the code:
VF Page:
<apex:pageblockSection title="Request Type" columns="1">
<apex:inputField value="{!Case.Case_Type__c}">
<apex:actionSupport event="onchange" action="{!nullifyRequestSection}" reRender="panelFirstid"/>
</apex:inputField></apex:pageblockSection>
<apex:outputPanel id="panelFirstid">
<apex:pageblockSection columns="1" rendered="{!IF(Case.Case_Type__c == 'Change Request' || Case.Case_Type__c == 'Documentation Request',true,false)}">
<apex:inputField value="{!Case.Narrative_of_Type__c}"/>
</apex:pageblockSection>
Apex class:
public class Case_Controller{
private final Case testCase;
public Case_Controller(ApexPages.StandardController stdController) {
this.testCase = (Case)stdController.getrecord();
}
public PageReference nullifyRequestSection(){
testCase.Narrative_of_Type__c = null;
//testCase.Narrative_of_Type__c = '';
}
}
Please suggest any solution you have for this issue. Thanks a lot in advance.