• ForceDev
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
Hello,
 
I am trying to take advantage of the new StandardSetController functionality with a custom data set (not driven through a predefined listview filter).  I am having difficulty finding the right syntax within the controller to enable this.
 
I have the following page:
Code:
<apex:page standardController="Account" extensions="ListPOC_Controller" tabStyle="Account" recordSetVar="Accts">  <apex:form id="theForm">
   <apex:sectionHeader title="Page: {!pageNumber}" subtitle="Total Results: {!resultSize}">
    <apex:pageBlock >
     <apex:pageBlockTable value="{!Accts}" var="acct">
      <apex:column value="{!acct.id}" />
       <apex:column value="{!acct.name}" />
     </apex:pageBlockTable>
    </apex:pageBlock>
   </apex:sectionHeader>
  </apex:form>
 </apex:page>
 
And my most recent cut of the controller extension is as follows:

Code:
public class ListPOC_Controller {
  public ListPOC_Controller(ApexPages.StandardSetController stdSetController) {
        // what static var do I need to bind— 
 }
   public List <Account> getAccts() {   return [select id, name from Account limit 25];   
}

Is this even possible?  Can anyone help me fill in the gaps on the controller extension?
 
Thanks in advance.


Message Edited by mtbclimber on 10-04-2008 12:10 PM
Hello,
 
I am trying to take advantage of the new StandardSetController functionality with a custom data set (not driven through a predefined listview filter).  I am having difficulty finding the right syntax within the controller to enable this.
 
I have the following page:
Code:
<apex:page standardController="Account" extensions="ListPOC_Controller" tabStyle="Account" recordSetVar="Accts">  <apex:form id="theForm">
   <apex:sectionHeader title="Page: {!pageNumber}" subtitle="Total Results: {!resultSize}">
    <apex:pageBlock >
     <apex:pageBlockTable value="{!Accts}" var="acct">
      <apex:column value="{!acct.id}" />
       <apex:column value="{!acct.name}" />
     </apex:pageBlockTable>
    </apex:pageBlock>
   </apex:sectionHeader>
  </apex:form>
 </apex:page>
 
And my most recent cut of the controller extension is as follows:

Code:
public class ListPOC_Controller {
  public ListPOC_Controller(ApexPages.StandardSetController stdSetController) {
        // what static var do I need to bind— 
 }
   public List <Account> getAccts() {   return [select id, name from Account limit 25];   
}

Is this even possible?  Can anyone help me fill in the gaps on the controller extension?
 
Thanks in advance.


Message Edited by mtbclimber on 10-04-2008 12:10 PM