1

I got this coding from this site

http://blog.ryansieve.com/2012/06/06/pagination-made-easy-with-standard-set-controllers/

and i am trying to customize it to get the same paging model, but inside the vf page code consists of the following which contains resultsize method. Now, i came to know this method supports sobject type and not List. i am getting results from real time webservice and coming as a list. Any suggestions please?

<apex:outputPanel layout="block" styleClass="pSearchShowMore" id="otpNav2">
            <apex:outputText rendered="{!IF(acctSSC.resultSize==10000,true,false)}">Total: 10000 +</apex:outputText>
            <apex:outputText rendered="{!IF(acctSSC.resultSize < 10000,true,false)}">Total: {!acctSSC.resultSize}</apex:outputText>
            <apex:image url="/img/search_prevarrow_disabled.gif" rendered="{!NOT(acctSSC.HasPrevious)}"/>
            <apex:image url="/img/search_prevarrow.gif" title="Previous Page" rendered="{!acctSSC.HasPrevious}"/>
            <apex:commandLink value="Previous Page" action="{!previous}" rendered="{!acctSSC.HasPrevious}" rerender="pbAccts" />
            <apex:outputPanel style="color: grey;" rendered="{!NOT(acctSSC.HasPrevious)}">Previous Page</apex:outputPanel>         
             ({!IF(acctSSC.PageNumber == 1,1,((acctSSC.PageNumber -1) * acctSSC.PageSize)+1)}-{!IF(acctSSC.resultSize < acctSSC.PageSize,acctSSC.resultSize,acctSSC.PageNumber * acctSSC.pageSize)}) 
            <apex:outputPanel style="color:grey;" rendered="{!NOT(acctSSC.HasNext)}">Next Page</apex:outputPanel>         
            <apex:commandLink action="{!next}" value="Next Page" rendered="{!acctSSC.HasNext}" rerender="pbAccts"/> 
            <apex:image url="/img/search_nextarrow.gif" title="Next Page" rendered="{!acctSSC.HasNext}"/>
            <apex:image url="/img/search_nextarrow_disabled.gif" rendered="{!NOT(acctSSC.HasNext)}"/>          
        </apex:outputPanel>
3
  • 2
    Are you looking for something like salesforce.stackexchange.com/questions/30351/…
    – highfive
    Mar 31, 2014 at 18:20
  • @highfive i have tried to get the one given above. Okay, let me try your approach.
    – Bforce
    Mar 31, 2014 at 19:04
  • Get the idea from the given link, then you can customize it as you need. Basic paging features are there
    – highfive
    Apr 1, 2014 at 3:55

0

You must log in to answer this question.

Browse other questions tagged .