Tags » Pagination

Pagination to inflate analytics

Why it’s done and why it doesn’t work

How annoying is it when you see an interesting article online such as 18 popular breakfast foods you must avoid… 382 more words

Visualforce Standard Set Controller & Pagination

Standard Set Controller & Pagination

<apex:page controller="Pagination">
    <apex:form >
    <apex:sectionHeader title="Account" subtitle="Account List View"/>    
        <apex:pageBlock id="pb" mode="edit">
            <apex:pageBlockSection title="Account Pagination Demo" columns="1">
            <apex:pageBlockTable value="{!Accounts}" var="a">
                <apex:column value="{!a.Name}"/>
                <apex:column value="{!a.Type}"/>
                <apex:column value="{!a.BillingCity}"/>
                <apex:column value="{!a.BillingState}"/>
                <apex:column value="{!a.BillingCountry}"/>
            <apex:panelGrid columns="7">
                <apex:commandButton status="fetchStatus" reRender="pb" value="<< First" action="{!first}" disabled="{!!hasPrevious}" title="First Page"/>
                <apex:commandButton status="fetchStatus" reRender="pb" value="< Previous" action="{!previous}" disabled="{!!hasPrevious}" title="Previous Page"/>
                <apex:commandButton status="fetchStatus" reRender="pb" value="Next >" action="{!next}" disabled="{!!hasNext}" title="Next Page"/>
                <apex:commandButton status="fetchStatus" reRender="pb" value="Last >>" action="{!last}" disabled="{!!hasNext}" title="Last Page"/>
                <apex:outputText >{!(pageNumber * size)+1-size}-{!IF((pageNumber * size)>noOfRecords, noOfRecords,(pageNumber * size))} of {!noOfRecords}</apex:outputText>
                <apex:commandButton status="fetchStatus" reRender="pb" value="Refresh" action="{!refresh}" title="Refresh Page"/>
                <apex:outputPanel style="color:#4AA02C;font-weight:bold">
                    <apex:actionStatus id="fetchStatus" startText="Fetching..." stopText=""/>

public with sharing class Pagination {
    Public Integer noOfRecords{get; set;}
    Public Integer size{get;set;}
    public ApexPages.StandardSetController setCon {
            if(setCon == null){
                size = 5;
                string queryString = 'Select Name, Type, BillingCity, BillingState, BillingCountry from Account order by Name';
                setCon = new ApexPages.StandardSetController(Database.getQueryLocator(queryString));
                noOfRecords = setCon.getResultSize();
            return setCon;
    Public List<Account> getAccounts(){
        List<Account> accList = new List<Account>();
        for(Account a : (List<Account>)setCon.getRecords())
        return accList;
    public pageReference refresh() {
        setCon = null;
        return null;
    public Boolean hasNext {
        get {
            return setCon.getHasNext();
    public Boolean hasPrevious {
        get {
            return setCon.getHasPrevious();
    public Integer pageNumber {
        get {
            return setCon.getPageNumber();
    public void first() {
    public void last() {
    public void previous() {
    public void next() {

Pagination Best Practices

One of the most commonly overlooked elements of a site or app is their pagination controls. In many cases, they are treated by designers and developers as an afterthought. 25 more words

Web Development

Writer, format your paperback!

“Nothing screams ‘self published’ louder than an author trying to economise by squashing too much text on a page.”

CREATING a book for readers to hold in their hands is a craft.

1,413 more words
Write Regardless!

Naviagting an af:table in pagination mode from a bean

A question on the JDeveloper and ADF OTN forum asked about how to navigate to a specific page of an af:table in pagination mode. As of JDeveloper adf tables can be rendered in scroll mode or in pagination mode where only a specific number of rows are visible in the table. 863 more words


adfgok reblogged this on adfgok.