No Results
Search Tips:
- Please consider misspellings
- Try different search keywords
Newer Version Available
Pagination with a List Controller
You can add pagination to a page using a list controller by utilizing
the next and previous actions. For example, if
you create a page with the following markup:
By default, a list controller returns 20
records on the page. To control the number of records displayed on
each page, use a controller extension to set the pageSize. For information on controller
extensions, see Building a Controller Extension.
1swfobject.registerObject("clippy.codeblock-0", "9");<apex:page standardController="Account" recordSetvar="accounts">
2 <apex:pageBlock title="Viewing Accounts">
3 <apex:form id="theForm">
4 <apex:pageBlockSection >
5 <apex:dataList var="a" value="{!accounts}" type="1">
6 {!a.name}
7 </apex:dataList>
8 </apex:pageBlockSection>
9 <apex:panelGrid columns="2">
10 <apex:commandLink action="{!previous}">Previous</apex:commandlink>
11 <apex:commandLink action="{!next}">Next</apex:commandlink>
12 </apex:panelGrid>
13 </apex:form>
14 </apex:pageBlock>
15</apex:page>