+ Start a Discussion
dwwrightdwwright 

Displaying Child Object Records in a VF page

I have a Master-Detail relationship set up between two custom objects. The Master object is viewed and edited through a visualforce page. The child objects show up as a related list on that page. These child objects are also viewed and edited through a visual force page.

 

What I want to do is iterate through all instances of the child object that are currently attached to the master object, displaying their contents in a visualforce page which is embedded on the main page for the master object. Right now I'm attempting to do this with <apex:dataTable>

 

 

<apex:dataTable value="{!Quality_Document__c.SDQA__r}" var="S"> <apex:column> <apex:include pageName="SDQA180" /> </apex:column> </apex:dataTable>

 

 SDQA180 is the name of the display page for these child objects. I would like to embed an instance of this page for each child object that exists. How can I reference this page along with the Id of the current child object, so that the information for each child object is displayed in its own embedded page?

 

Many thanks