+ Start a Discussion
Tyler McCartyTyler McCarty 

Pagination with with a table based on a query

Hello, Im on the last part of this assignment and can't seem to find a way to get pagination to work with this table. I have a table that is filtered with a dropdown list. When i choose a dropdown selection the correct information will display and pagination will be accurate. But when I go to choose a different dropdown selection nothing happens.
I've posted the relevant code below. Everything else works fine. 

<apex:inputfield value="{!filterAccount.Type}" label="Account Type"> 

 <apex:actionSupport event="onchange" action="{!updateRecordList}" rerender="pwPanel"/>      
<apex:outputPanel rendered="{!recordList.size > 0}" id="account_filter">

      <apex:pageBlockSection >

<apex:pageBlockTable value="{!Accounts}" var="rl" id="record_list">

    public ApexPages.StandardSetController setcon 
            if(setCon == null)

                setCon = new ApexPages.StandardSetController(Database.getQueryLocator(
                    [Select Name, Type, Website, BillingStreet, BillingCity, BillingState, BillingPostalCode, BillingCountry  
                    from Account where type =:filterAccount.type Order by Name ASC Limit 10000]));
                noOfRecords = setCon.getResultSize();

            return setCon;

    // Initialize setCon and return a list of record    

    public List<Account> getAccounts() {  

       return setCon.getRecords();
       //fields returning for table
  public void updateRecordList()
       recordlist = setCon.getrecords();