Tuesday, April 23, 2013

ADF 11g PS6 Table Pagination and Displaying Selected Row Issue

There was a post about new ADF 11g PS6 feature Table Pagination - ADF 11g PS6 - ADF 10g Table Pagination Feature is Back Finally. I had a question from the reader in the comments, about displaying selected row from the page range other than the first. Reader was saying this doesn't work, indeed I tested it with sample application and it doesn't seem to work. If you plan to implement such use case where display of selected row is important, keep in mind there are related issue in ADF UI table pagination. I will describe them below.

Sample application - TablePaginationApp_v4.zip, contains ADF task flow with two fragments. Single row is selected in the first fragment and we try to display the same row in the table from second fragment:

I will show you first how it works by default. Table is set to display 10 rows per page and we navigate to some row in the next page range:

Press Show Employees button to navigate to the table. Table displays first page range, there is no selected row shown:

You can select manually second page range - you will find selected row there:

This is what blog reader explains in his comment - current row is not displayed.

Let's try to apply one trick and see if it works - DisplayRow = selected for ADF table component:

We test now the same thing - navigate to table of Employees with row selected in other than first range page:

Selected row is displayed now, required page range is loaded automatically from the beginning:

But there is another problem now - you are locked in into current page range. Try to press other range page number, it will be changed - but not data, data remains the same and insist to show selected row:

It seems like we can use table pagination only for such use cases, when there is no need to automatically display selected row. At least until workaround is found.


Sanjay Gouda said...

I am using 11.5 jdeveloper, as per your example, i have download to local and try to run. but i am getting Error(33,53): cannot find method getScrollPolicy().it seems , my adf 11g table and jeveloper 11.5 is not supporting table page scroll.please let me know any alternative .

Andrejus Baranovskis said...

This is not as per my example. Per my example you should have JDEV PS6 (


krish509 said...

Hi Andrejus,
we are using adf with java pojo objects not with business components.

can you explain me how to implement the pagination with pojo(we are using spring and hibernate for business logic)

1)adf table is having any handler methods to control the pagination?

Thanks in advance

Andrejus Baranovskis said...

Not sure. I would use ADF BC instead of POJO.