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 fetchCaseCallsController(ApexPages.StandardController sc) {
accountId = sc.getId();
}
public Task[] getTasks() {
if (accountId != null) {
return [
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="{!tasks}" 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.