Do you remember good old feature from ADF 10g - table pagination? So many customer requests I have heard to have it back in 11g and finally in ADF PS6 we have it. Not all good features mean bad, table pagination is perfect example. Some two years back I blogged sample application for custom table pagination like behavior - Oracle ADF 11g Custom Table Pagination.
Table pagination is out of the box in ADF 11g PS6:
Implementation steps are pretty simple. Firstly you should set scrolling policy to Page:
AutoHeightRows must be set to 0 and make sure that FetchSize is equal Range Size. FetchSize property determines how many rows are shows in single table page:
In this example I have set RangeSize = 10, this is how many rows are shown in table page:
Download ADF 11g PS6 sample application - TablePaginationApp.zip.
Update April 3rd, 2013:
Blog reader was asking if table pagination works in plain page - yes it works. Here is updated sample application - TablePaginationApp_v2.zip. Table with pagination is implemented directly inside main page, without any layout wrapping components, just below af:form:
Table pagination is rendered operational and without warnings in Google Chrome:
Work the same in IE:
Table pagination is out of the box in ADF 11g PS6:
Implementation steps are pretty simple. Firstly you should set scrolling policy to Page:
AutoHeightRows must be set to 0 and make sure that FetchSize is equal Range Size. FetchSize property determines how many rows are shows in single table page:
In this example I have set RangeSize = 10, this is how many rows are shown in table page:
Download ADF 11g PS6 sample application - TablePaginationApp.zip.
Update April 3rd, 2013:
Blog reader was asking if table pagination works in plain page - yes it works. Here is updated sample application - TablePaginationApp_v2.zip. Table with pagination is implemented directly inside main page, without any layout wrapping components, just below af:form:
Table pagination is rendered operational and without warnings in Google Chrome:
Work the same in IE:
Thanks alot,
ReplyDeletenice to have again ,
I have a question ,
what do you mean of ADF PS6
Thanks a lot,
There was new ADF 11g PS6 release published yesterday, check on OTN.
ReplyDeleteAndrejus
Andrejus, when you try to run a paged table in a jspx page (not in a fragment) you need to surround hte table with a panelGroupLayout in scroll mode to see the pagination bar.
ReplyDeleteotherwise you get an warning like
-TableRenderer- -_isPagingMode- falling back to scrolling mode since we need parent component to flow and authHeightRows=0
Timo
There is no such warning in my sample app, because AutoHeightRows = 0 and I'm using showDetailItem - it allows to flow.
ReplyDeleteAndrejus
Hi Timo,
ReplyDeleteI tested with simple page - pagination works for table, without wrapping table into panelGroupLayout. It works with table being under simple af:form as root.
You should double check it.
Andrejus
does this feature exists in 11.1.2.3?
ReplyDeleteNo, only new ADF 11g PS6 from this week.
ReplyDeleteAndrejus
its only in ADF 11g R1
ReplyDeleteYes, as the blog title suggests ;)
ReplyDeleteso if i have application developed in ADF11g R2 what shall i do :-(
ReplyDeleteThats a problem I'm facing also. I think Oracle release management is a bit strange with these R1 and R2 parallel branches. There is nothing as only to wait for 12c, when we could migrate from R2 directly to 12c.
ReplyDeleteAndrejus
Andrejus, I checked it out again and it turned out that you can't put the table in a stretch layout container. It has to be in a layout container in scroll mode. I wrote a sample and blog about it here http://tompeez.wordpress.com/2013/04/03/jdev-11-1-1-7-0-table-pagination-beware-of-the-layout-container/
ReplyDeleteIt was working for me even in simple page, just under af:form. May be its your browser issue? I was testing with google chrome.
ReplyDeleteDo you mean something is wrong with my sample app?
Andrejus
Hi Timo,
ReplyDeleteI posted updated sample app (read in this post above), where table with pagination is just above af:form. And it works well. Please test it.
Andrejus
Hi Andrejus
ReplyDeletewhen I use paging in table with 2 column paging navbar does not show complete how can I fix it?
You need to give enough space - otherwise it will be rendered as compact.
ReplyDeleteAndrejus
I've tried the new pagination. I've a problem when using an edit form on a separate page fragment. When the user saved the changes I execute the iterator to refresh the data in the table.I use get/setCurrentRowKeyString to reactivate the current row after the refresh. But when I'm on a page greater 1, ADF always displays the first page in the table and not the page the row is displayed on. How can I fix this?
ReplyDeleteGood question - I will check this.
ReplyDeleteAndrejus
I am trying to use the pagination feature in jDeveloper 11.1.2.4.0 and downloaded your test project. I am getting the error on this attribute on table: scrollPolicy="page".
ReplyDeleteIt does not show in the property inspector as well.
Any idea why ?
Thanks
Mikhail
Means you are using wrong JDEV version, should be PS6.
ReplyDeleteAndrejus
I know I have next version of jDeveloper..just not sure why next version does not support something which pervious has introduced.
ReplyDeleteRegards
Mikhail
You should check release notes.
ReplyDeleteAndrejus
Hi,
ReplyDeleteI've tested the pagination feature.
1. The "Last Page" button doesn't seem to work well, it advances from page 1 to 2 for example (I only have 2 pages), but the grid still displays data from page 1.
2. Can the pagination control from the grid's footer be separated from the grid? It's annoying because I have a vertical splitter, the grid is in the top facet in a panelCollection, and I had to put the panelCollection in a panelGroupLayout scrollable, so it scrolls the entire panelCollection. I want that the pagination control to be always visible no matter where the scroll is.
Many thanks,
Bogdan.
When I click on View->Columns->Show All, Why the all the control in the right side of the pagination such as previous, begin, next, end, and the page number, are disappeared ? Thanks
ReplyDeleteWe are using standard ADF UI components (ADF Table Pagination feature) and when all the rows fit in one page, the Page X of X (x-x of x items) is not displayed.
ReplyDeleteIs this a limitation or have we missed some property settings?
Thanks in advance!
Hi,
ReplyDeleteNice info.
I am facing an issue where when I use scrollPolicy="page", and zoom in/out browser the rows from table disappears and on further action I comes back.
Any suggestions?
Saurabh
Hi,
ReplyDeleteThis is tricky, it could depend on outer UI layout components structure in your page.
Regards,
Andrejus
Found solution. columnStretching was the issue.
ReplyDeleteThanks for quick reply :)