Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
public class sample { public List<Account> acct {get;set;} public sample() { String soql = 'SELECT Name, (SELECT Name, Email FROM Contacts) FROM Account LIMIT 5'; acct = Database.Query(soql); } }
<apex:page controller="sample"> <apex:pageBlock > <apex:pageBlockTable value="{!acct}" var="a"> <apex:column value="{!a.Name}"/> <apex:repeat value="{!a.Contacts}" var="c"> <apex:column value="{!c.Name}"/> </apex:repeat> </apex:pageBlockTable> </apex:pageBlock> </apex:page>