You need to sign in to do that
Don't have an account?
BoolsEye
ApexPages.StandardSetController example from Winter 09 Developers Guide not working ?
I tried to create the ApexPages.StandardSetController example from the Winter 09 Apex Developers Guide in our Pre-Release environment.
I create the controller and the page as displayed below. The controller is ok but when I try to save the page I get the error:
Error: Unknown property 'SObject.name'
I first tried this with a custom object and got the same error, can anyone confirm this.
Is there a cast missing somewhere ?
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; } }
Code:
<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>
You should sign up for it first:
http://wiki.apexdevnet.com/index.php/Winter_09
... setCon {get;set;}
will work in in place of separate getter and setter declarations.