" using a List? | Solved, www.helpinterview.com, help, interview,Learn Node.js for interview, Node Js Interview Questions, help interview, salesforce, salesforce.com, salesforce interview questions, help interview questions, node js tutorial, data science, help java, help php, help machine learning, help android, technical interview question, interview question, technical question, help !!!! interview, help! interview, interview !!! algorithm, interview algorithm, kotlin interview questions, salesforce interview questions, lightning interview questions">
Find your content:

Search form

You are here

Pagination - how to create "Total: 12 < Previous Page (6-10) Next Page >" using a List?

 
Share

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>

Attribution to: Bforce
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/31429

My Block Status

My Block Content