You need to sign in to do that
Don't have an account?
fcomdeveloper
Not getting Records in ApexPages.StandardSetController in VF
The sql statement in the ApexPages.StandardSetController get set is also not executing. I am not able to see the records in the Visualforce page. Help
When I see the debug logs I dont even see the other methods executing. Help me.
public with sharing class RetentionListRecon { public List<Commissions__c> comms{get;set;} public String date1{get;set;} public Id rtype; public Date d1; public String query; public RetentionListRecon(){ List<RecordType> rt = [Select Name, Id From RecordType where sObjectType='Commissions__c' and isActive=true]; Map<String,String> rtypes = new Map<String,Id>{}; for(RecordType r: rt) rtypes.put(r.Name,r.Id); rtype=rtypes.get('Retention Team Cases'); d1=Date.newInstance(2012,01,03); query='[Select Id, Name FROM Commissions__c where Keep__c=:true and RecordTypeId=:'+rtype+' and PerPostDate__c=:'+d1+']'; } public ApexPages.StandardSetController con { get { if(con == null) { con = new ApexPages.StandardSetController(Database.getQueryLocator(query)); // sets the number of records in each page set con.setPageSize(100); } return con; } set; } public List<Commissions__c> getcomms() { comms = (List<Commissions__c>)con.getRecords(); return comms; } public PageReference process() { return null; } // returns the first page of records public void first() { con.first(); } // returns the last page of records public void last() { con.last(); } // returns the previous page of records public void previous() { con.previous(); } // returns the next page of records public void next() { con.next(); } // returns the PageReference of the original page, if known, or the home page. public void cancel() { con.cancel(); } }
And here is the VF code
<apex:page controller="RetentionListRecon"> <apex:form > <apex:pageBlock title="Retention Team Reconcilliation" id="reconblock" rendered="true"> <apex:pageBlockTable value="{!comms}" var="c"> <apex:column value="{!c.Keep__c}" headerValue="Keep?"/> <apex:column value="{!c.Name}" headerValue="Name"/> </apex:pageBlockTable> </apex:pageBlock> </apex:form> </apex:page>
And here are the logs
24.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO;CALLOUT,INFO;DB,INFO;SYSTEM,DEBUG;VALIDATION,INFO;VISUALFORCE,INFO;WORKFLOW,INFO 19:12:49.092 (92889000)|EXECUTION_STARTED 19:12:49.092 (92927000)|CODE_UNIT_STARTED|[EXTERNAL]|066Q00000005Cvl|VF: /apex/RetentionListReconPage 19:12:49.094 (94407000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ00000001ugK|RetentionListRecon <init> 19:12:49.094 (94421000)|SYSTEM_MODE_ENTER|true 19:12:49.095 (95383000)|METHOD_ENTRY|[1]|01pQ00000001ugK|RetentionListRecon.RetentionListRecon() 19:12:49.095 (95461000)|SYSTEM_MODE_ENTER|false 19:12:49.095 (95470000)|SYSTEM_MODE_EXIT|false 19:12:49.095 (95479000)|METHOD_EXIT|[1]|RetentionListRecon 19:12:49.095 (95530000)|SYSTEM_MODE_ENTER|false 19:12:49.095 (95543000)|SYSTEM_MODE_EXIT|false 19:12:49.095 (95550000)|SYSTEM_MODE_ENTER|false 19:12:49.095 (95799000)|SOQL_EXECUTE_BEGIN|[8]|Aggregations:0|select Name, Id from RecordType where (sObjectType = 'Commissions__c' and isActive = true) 19:12:49.108 (108079000)|SOQL_EXECUTE_END|[8]|Rows:2 19:12:49.108 (108241000)|SYSTEM_METHOD_ENTRY|[10]|LIST.iterator() 19:12:49.109 (109312000)|SYSTEM_METHOD_EXIT|[10]|LIST.iterator() 19:12:49.109 (109518000)|SYSTEM_METHOD_ENTRY|[10]|system.ListIterator.hasNext() 19:12:49.109 (109550000)|SYSTEM_METHOD_EXIT|[10]|system.ListIterator.hasNext() 19:12:49.109 (109563000)|SYSTEM_METHOD_ENTRY|[10]|system.ListIterator.next() 19:12:49.109 (109584000)|SYSTEM_METHOD_EXIT|[10]|system.ListIterator.next() 19:12:49.109 (109652000)|SYSTEM_METHOD_ENTRY|[11]|MAP.put(ANY, ANY) 19:12:49.109 (109681000)|SYSTEM_METHOD_EXIT|[11]|MAP.put(ANY, ANY) 19:12:49.109 (109689000)|SYSTEM_METHOD_ENTRY|[10]|system.ListIterator.hasNext() 19:12:49.109 (109698000)|SYSTEM_METHOD_EXIT|[10]|system.ListIterator.hasNext() 19:12:49.109 (109704000)|SYSTEM_METHOD_ENTRY|[10]|system.ListIterator.next() 19:12:49.109 (109716000)|SYSTEM_METHOD_EXIT|[10]|system.ListIterator.next() 19:12:49.109 (109732000)|SYSTEM_METHOD_ENTRY|[11]|MAP.put(ANY, ANY) 19:12:49.109 (109742000)|SYSTEM_METHOD_EXIT|[11]|MAP.put(ANY, ANY) 19:12:49.109 (109747000)|SYSTEM_METHOD_ENTRY|[10]|system.ListIterator.hasNext() 19:12:49.109 (109755000)|SYSTEM_METHOD_EXIT|[10]|system.ListIterator.hasNext() 19:12:49.109 (109775000)|SYSTEM_METHOD_ENTRY|[12]|MAP.get(ANY) 19:12:49.109 (109796000)|SYSTEM_METHOD_EXIT|[12]|MAP.get(ANY) 19:12:49.109 (109839000)|SYSTEM_METHOD_ENTRY|[13]|Date.newInstance(Integer, Integer, Integer) 19:12:49.109 (109868000)|SYSTEM_METHOD_EXIT|[13]|Date.newInstance(Integer, Integer, Integer) 19:12:49.109 (109891000)|SYSTEM_METHOD_ENTRY|[14]|String.valueOf(Object) 19:12:49.109 (109909000)|SYSTEM_METHOD_EXIT|[14]|String.valueOf(Object) 19:12:49.109 (109929000)|SYSTEM_METHOD_ENTRY|[14]|String.valueOf(Object) 19:12:49.109 (109943000)|SYSTEM_METHOD_EXIT|[14]|String.valueOf(Object) 19:12:49.109 (109958000)|SYSTEM_MODE_EXIT|false 19:12:49.109 (109979000)|CODE_UNIT_FINISHED|RetentionListRecon <init> 19:12:49.110 (110021000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ00000001ugK|RetentionListRecon get(comms) 19:12:49.110 (110032000)|SYSTEM_MODE_ENTER|true 19:12:49.110 (110044000)|CODE_UNIT_STARTED|[EXTERNAL]|01pQ00000001ugK|comms 19:12:49.110 (110064000)|CODE_UNIT_FINISHED|comms 19:12:49.110 (110069000)|CODE_UNIT_FINISHED|RetentionListRecon get(comms) 19:12:49.149 (149446000)|VF_SERIALIZE_VIEWSTATE_BEGIN|066Q00000005Cvl 19:12:49.150 (150875000)|VF_SERIALIZE_VIEWSTATE_END 19:12:49.147 (153968000)|CUMULATIVE_LIMIT_USAGE 19:12:49.147|LIMIT_USAGE_FOR_NS|(default)| Number of SOQL queries: 1 out of 100 Number of query rows: 2 out of 50000 Number of SOSL queries: 0 out of 20 Number of DML statements: 0 out of 150 Number of DML rows: 0 out of 10000 Number of script statements: 13 out of 200000 Maximum heap size: 0 out of 6000000 Number of callouts: 0 out of 10 Number of Email Invocations: 0 out of 10 Number of fields describes: 0 out of 100 Number of record type describes: 0 out of 100 Number of child relationships describes: 0 out of 100 Number of picklist describes: 0 out of 100 Number of future calls: 0 out of 10 19:12:49.147|CUMULATIVE_LIMIT_USAGE_END 19:12:49.153 (153995000)|CODE_UNIT_FINISHED|VF: /apex/RetentionListReconPage 19:12:49.154 (154004000)|EXECUTION_FINISHED
Help me.