Thursday, March 14, 2013

Usage of Previous and Next links


Visualforce Page:

<apex:page StandardController="Account" extensions="insertrecordscls1" recordsetVar="accs">
     <Apex:form >
         <apex:pageblock >
             <apex:Pageblocktable value="{!accs}" var="a">
                 <apex:column value="{!a.name}"/>
                 <apex:column value="{!a.phone}"/>
             </apex:pageblocktable>
         </apex:pageblock>
        <apex:CommandLink value="Previous" action="{!previous}"/>&nbsp;&nbsp;&nbsp;
        <apex:CommandLink value="Next" action="{!next}"/>
     </Apex:form>
</apex:page>

Apex CLass:

public with sharing class insertrecordscls1 {

    public insertrecordscls1(ApexPages.StandardSetController controller) {
        controller.setPageSize(10);
                                                                                                               }
                                                                }

No comments:

Post a Comment