You need to sign in to do that
Don't have an account?
Ron Wild
Problems with pagination on custom object
I'm trying to set up a custom list controller to take advantage of the new build-in pagination capabilities in the new release, but the example provided in the docs doesn't appear to be working.
The sample code:
public class opportunityList2Con {
public ApexPages.StandardSetController setCon {
get {
if(setCon == null) {
setCon = new ApexPages.StandardSetController(Database.getQueryLocator([select
name,closedate from Opportunity]));
}
return setCon;
}
set;
}
}
<apex:page controller="opportunityList2Con">
<apex:pageBlock >
<apex:pageBlockTable value="{!setCon.records}" var="o">
<apex:column value="{!o.name}"/>
<apex:column value="{!o.closedate}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Produces a compiler error: "Unknown Property: 'SObject.name'" My dev account is on NA6 so I do have the winter '09 release.
Has anyone succeeded in using the pagination feature with a custom list controller??
Thanks,
The sample code:
public class opportunityList2Con {
public ApexPages.StandardSetController setCon {
get {
if(setCon == null) {
setCon = new ApexPages.StandardSetController(Database.getQueryLocator([select
name,closedate from Opportunity]));
}
return setCon;
}
set;
}
}
<apex:page controller="opportunityList2Con">
<apex:pageBlock >
<apex:pageBlockTable value="{!setCon.records}" var="o">
<apex:column value="{!o.name}"/>
<apex:column value="{!o.closedate}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
Produces a compiler error: "Unknown Property: 'SObject.name'" My dev account is on NA6 so I do have the winter '09 release.
Has anyone succeeded in using the pagination feature with a custom list controller??
Thanks,
BoolsEye
The documentation is wrong, you can find the answer here