You need to sign in to do that
Don't have an account?

Standard Set Controller and Child Relationships
How do I work with child relationships in a standard set controller with dynamic visualforce? Here is what I was trying to do. This is not a working example (it throws a system.security.NoAccessException: Object type not accessible. error) but I was hopping I was close to what needs to be done. I know I can write apex to get what I need with the child relationship but I'm trying to use the native power of visualforce.
<<< The Page >>> <apex:page standardController="myObj__c" extensions="myObjExtension" recordSetvar="myObj"> ... <apex:listViews type="myObj__c"> <apex:facet name="body"> <apex:outputPanel> <apex:repeat value="{!MySetController.Records}" var="pv"> <apex:outputLabel value="{!pv['name']}" /> ... <apex:repeat value="{!pv['Relationship__r']}" var="cv"> <apex:outputLabel value="{!cv['foo']}" /> ... </apex:repeat> </apex:repeat> </apex:outputPanel> </apex:facet> </apex:listViews> ... <<< The Extension >>> public class myExtension { public ApexPages.StandardSetController mySetController { get; set; } public myExtension(ApexPages.StandardSetController controller) { mySetController = controller; mySetController.addFields(new String[{'name','Relationship__r.foo'}); ... } }
Any thoughts or opinions would help.
Kiran, your example is not dynamic nor is it using a standard set controller. Thanks anyhow.
Anyone else?