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:
<apex:page standardController="Account" recordSetVar="accounts">
<apex:form >
<apex:pageBlock title="My Accounts">
<apex:pageBlockSection >
<apex:dataList value="{!accounts}" var="a">{!a.name}
</apex:dataList>
</apex:pageBlockSection>
<apex:panelGrid columns="2">
<apex:commandLink action="{!previous}">Previous</apex:commandLink>
<apex:commandLink action="{!next}">Next</apex:commandLink>
</apex:panelGrid>
</apex:pageBlock>
</apex:form>
</apex:page>
<apex:dataList>
An ordered or unordered list of values that is defined by iterating over a set of data. The body of the <apex:dataList>component specifies how a single item should appear in the list. The data set can include up to 1,000 items.

No comments:
Post a Comment