I have a controller which I use to get all calls that were made against all Opportunities against an Account Object.
public with sharing class getOppCallsController {
private Id accountId;
public List<Task> oppCalls {get;set;}
public getOppCallsController (ApexPages.StandardController sc) {
accountId = sc.getId();
oppCalls = new List<Task>();
}
public Task[] getOppCalls() {
if (accountId != null) {
return oppCalls = [
select Id, Subject
from Task
where WhatId in (select Id from Opportunity where AccountId = :accountId)
and Type = 'Call'
];
} else {
return new Task[] {};
}
}
}
Now I want to create a Visualforce page which displays these calls.
Opportunity Name | Call Subject | Call Date (or similar to that)
I have written the following, just to do a bit of testing, because I am new to this, but I seem to already fail right in the beginning.
<apex:page standardController="Account" extensions="getOppCallsController">
<apex:repeat value="{!oppCalls.Subject}">
</apex:repeat>
</apex:page>
I get the error: Error: Unknown property 'VisualforceArrayList.Subject'
Not sure what to do next. Tia.