function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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:inputfield>
   <br/><br/><br/>
            <!-----------Table---------->                  
<apex:outputPanel rendered="{!recordList.size > 0}" id="account_filter">

      <apex:pageBlockSection >

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


    //pagination  
    public ApexPages.StandardSetController setcon 
    {
        get
        {
            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]));
                setCon.setpageSize(pageSize);
                noOfRecords = setCon.getResultSize();

            }
            return setCon;
        }
        set;
        
    }

    // 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();
    }