While doing pagination for task using standardsetcontroller it's throwing error List controllers are not supported for Task
What is the other way to show data on vfpage in pagination format for task record using standardsetcontroller?
public ApexPages.StandardSetController setContask {
get{
if(setContask == null){
string queryString = 'SELECT Priority,Subject,Status,Type from Task WHERE Status != \'Completed\'';
setContask = new ApexPages.StandardSetController(Database.getQueryLocator(queryString));
setContask.setPageSize(size);
noOfRecords = setCon.getResultSize();
}
return setContask;
}set;
}
Public List<Task> getTask(){
return (List<Task>) setContask.getRecords();
}
<apex:pageBlockTable value="{!Task}" var="t">
<apex:column value="{!t.Priority}"/>
<apex:column value="{!t.Subject}"/>
<apex:column value="{!t.Status}"/>
<apex:column value="{!t.Type }"/>
</apex:pageBlockTable>
StandardSetController
and it should mostly be clear how to do so.