I am not able to pull the sub query values from visualforce page. Here is my controller and VF code.Guide me through this please….
Apex Class:
public with sharing class OpenActivity {
public List<Contact> actRList { get; private set; }
private boolean Linked = false;
public id id = ApexPages.currentPage().getParameters().get('id');
// public List<Contact> searchedGpIds = [SELECT ID,Group_ID__c FROM Contact WHERE id =:id];
public List<string> searchedConIds = new List<string>();
public void ViewData()
{
actRList = [Select (Select o.What.Name,o.subject, o.WhatId, o.IsTask, o.ActivityDate, o.Account.Name From OpenActivities o) from Contact where ID=:id];
}
public OpenActivity (ApexPages.StandardController sc)
{
// actRList = [Select (Select o.What.Name,o.subject, o.WhatId, o.IsTask, o.ActivityDate, o.Account.Name From OpenActivities o) from Contact where ID=:id];
ViewData ();
}
public boolean getLinked()
{
Return Linked;
}
public void setLinked (Boolean value)
{
Linked = value;
}
}
VF Page:
<apex:pageBlockTable value="{!actRList.o}" var="a">
<apex:column value="{!a.subject}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:form>
</apex:Page>
Error:
Error: Unknown property 'VisualforceArrayList.o'
Best Answer
Like @sfdcfox said you can follow like
Or
Or some other ways
you are getting only OpenActivities records related to specific contact record So what you can do create
List<OpenActivity>
VF page
or looks like you are playing with single contact record then you can use like below
Page