+ Start a Discussion
BylithiumBylithium 

Rerender in VF Page

Hi I am building a page when Resource__c == 'Yes' display the Type__c . I have written the code but the functionality is not working. If any one can help that would be great!!

 

 

<apex:page standardController="Form__c">
<apex:form>
<apex:pageBlock title="MTRForm">
<apex:pageblockSection title="Test" columns="1">
<apex:inputField value="{!form__c.Resource__c}"/>
<apex:actionSupport event="onchange" reRender="MTR" />
</apex:pageblockSection>
<apex:outputPanel id="MTR">
<apex:outputpanel rendered="{!form__c.Resource__c == 'Yes'}">
<apex:pageblockSection>
<apex:inputField value="{!form__c.type__c}"/>
</apex:pageblockSection>
</apex:outputpanel>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>

Best Answer chosen by Admin (Salesforce Developers) 
jwetzlerjwetzler

actionSupport needs to be a child component of your inputField.

All Answers

jwetzlerjwetzler

Please review the documentation for the actionSupport component.  It needs to be a child of the component you wish to attach your action to.

BylithiumBylithium

Hi the document does not have detail description. Can you let me know how do I do with my above query. Probably that would make it much easier to understand.

jwetzlerjwetzler

actionSupport needs to be a child component of your inputField.

This was selected as the best answer
BylithiumBylithium

Got it thanks a lot