I am having problems with the my visualforce page displaying the data from my SOQL query.
This is my controller:
public with sharing class fetchCaseCallsController {
private Id accountId;
public List<Task> caseCalls {get;set;}
public fetchCaseCallsController(ApexPages.StandardController sc) {
accountId = sc.getId();
caseCalls = new List<Task>();
}
public Task[] getCaseCallsgetTasks() {
if (accountId != null) {
return caseCalls = [
select Id, Subject
from Task
where WhatId in (select Id from Case where AccountId = :accountId)
and Type = 'Call'
];
} else {
return new Task[] {};
}
}
}
Basically in the controller I am querying all calls that were made against a case for a specific account.
My VF page looks as follows:
<apex:page standardController="Account" extensions="fetchCaseCallsController">
<h1>Logged calls against cases</h1>
<table>
<apex:repeat value="{!caseCallstasks}" var="act">
<tr>
<td>This is the subject {!act.Subject}</td>
</tr>
</apex:repeat>
</table>
</apex:page>
I don't really understand why nothing is displayed on my page? Tia.