Wednesday, May 14, 2014

Different ways to achieve "Pagination" in Salesforce.

When it comes to pagination in visual force page we relay on the most widely used approach that is :
StandardSetController. By far it is the best thing that we can use but some times it might happen that we need to used some other variables with the data records in a table and at that time we might not be able to use "StandardSetController". Also it might happen that binding and rebinding of data list back and forth from "getRecords()" is time taken and we need a more direct approach.

We can do this by three ways:-
1. StandardSetController with binding and rebinding using wrapper class.
2. Using offset for displaying just records not using wrapper class.
3. Using List.size() to determine page number and get records from index.

No comments:

Post a Comment