I am trying to rerender an input field based on the event 'onchange' specific other input field which is of type multiselect picklist.
vf page
<apex:inputField value="{!MyObject__c.myField__c}">
<apex:actionSupport action="{!myMethod}" rerender="idToRender" event="onchange"/>
</apex:inputField>
<apex:inputField id="idToRender" value="{!MyObject__c.toBeRenderedField__c}" rendered="{!myBool}"/>
apex class
myMethod()
{
myBool = true;
}
Best Answer
<apex:inputField id="idToRender" value="{!MyObject__c.toBeRenderedField__c}" rendered="{!myBool}"/>
Instead of this you need to do this
Because when first time page load this
inputfield
isrendered= false
so it is not available on page so you can'trerender
it. In that case we need torerender
the parent component.