I have a visualforce page that is being rerendered. It contains 2 sections:
- First section contains a list of child records using the OOTB syntax (not sure what to call it)
- Second section contains a list of child records using a SOQL query in the extension
I've confirmed the rerender is working, but it only works on the child records driven by the extension's SOQL query.
Code snipet:
<apex:page standardController="MyParentObject__c" extensions="MyParentObjectExt">
<apex:form id="theForm">
<apex:actionFunction action="{!MyActionMethod}" name="MyActionMethod" rerender="dataPanel" />
<apex:pageBlock id="thePageBlock">
<apex:outputPanel id="dataPanel" layout="block">
{!now()} <!-- to show the panel is rerendering -->
<!-- uses the OOTB relationship to the child records -->
<apex:pageBlockSection>
<apex:pageBlockTable var="thisChild" value="{!MyParentObject__c.My_Childs__r}">
... column data ommited for brevity ...
</apex:pageBlockTable>
</apex:pageBlockSection>
<!-- Uses an extension mehod the returns a list of My_Child__c records -->
<apex:pageBlockSection>
<apex:pageBlockTable var="thisChild" value="{!MyExtensionMethod}">
... column data ommited for brevity ...
</apex:pageBlockTable>
</apex:pageBlockSection>
</apex:outputPanel>
</apex:pageBlock>
</apex:form>
</apex:page>
Does anyone know why the OOTB relationship syntax doesn't rerender, and whether there's a way to get it to rerender?
I'd much rather use the OOTB way, meaning I don't need an extension, and I don't have to synchronise my SOQL query with the fields displayed on the page.