Simple Traditional ADF Pagination Component

ADF rich table is very very powerful, however in certain circumstances, you may still want to customize it or go back to the old style. This article provides a minimum working skeleton that you could start with, the source code is attached. This skeleton provides following functions:

  1. The pagination loads only the records of the page
  2. When the pagination buttons (i.e. next page, go button etc) is clicked, only the table area will be refreshed
  3. When the sorting button in table header is clicked, the whole result records will be sorted; sorting of records only in the page is also possible
  4. There can be multiple pagination tables in same page

Below is a sample diagram:

To use this component, you could just add following line below the rich table in your page:

<cp:pagination id=“staffPi” for=“staffsTb” value=“#{pageFlowScope.DummyMB.staffPagination}” action=“#{pageFlowScope.DummyMB.navigate}”/>

The attributes:

for: the id of the rich table component (“<af:tableā€¦>”)

value: the value of the pagination object, which stores the start, end index, the page size used by the backend queries as well as the rich table.

action: the method in the backing bean, it’s invoked when the pagination buttons are clicked.

The attached code should be helpful for you to customize it into other pagination styles or help you develop other components. To run the code, right click “dummy-task-flow” in “Page Flows” folder and then click “Run”. After that, click “Load Staff” link to load the staff. The code is developed using JDeveloper 11g (11.1.1.30).

Source Code Is Here