This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am having problems with the af:table component when paging through a data list.
I have a table with 25 elements from a List broken up by pages of 10 (using the rows attribute of the table). When I click on a link in the table, it takes me to an edit page for one element, after the edit/save or cancel, I want to return to the same page in the table. I have this working except when I view the entire list. The adf Faces table has a drop down box at the top that lets you specify the range of elements to view. I have the list broken up into 10 element sections. When I use the drop down list to select the range for the table and choose "Show All of 25", the first and rows properties of the Table are not being set. When I select one of the other ranges (ie 11 - 20), all works fine. What I am doing is passing the table.first and table.rows values to the Process scope (Provided by ADF Faces) then am collecting them back when the table reloads. Like I say, everything works fine except when using the "Show All" range from the drop down box. I am using the latest release of ADF Faces with MyFaces as the Implementation. Could this be a bug with the af:table component?
I'll forward this on to one of our ADF Faces/Trinidad developers.
Are you using Trinidad from MyFaces or are you using ADF Faces from within JDeveloper?
Joined: May 20, 2005
Thanks for replying, I am using ADF Faces from Oracle. Not using JDeveloper as the IDE though. Just ADF Faces standalone on JBOSS 4.0.4GA with MyFaces. I am using Netbeans 5.5 Beta2 not that it really matters. [ September 13, 2006: Message edited by: Brian Smith ]
Joined: May 20, 2005
Just to give a few more details. When I select a specified range from the drop down box at the top of the table
ie 1-10 11-20 21-25
The first and rows properties are set correctly and the table displays the range I request.
If I select the "Show All" range from the drop down box.
ie "Show All 25"
The entire list is displayed but the first and rows properties are set to 0 and 10 respectively. According to the documentation, the rows property should be set to 0 to display all rows
public final void setRows(int rows)
Sets the maximum number of rows to display in a single range of rows. Some ranges might have fewer than the number of rows specified by this attribute (eg: the last range might have an insufficient number of rows). To display all rows at once, set this attribute to 0.
As far as I can tell this is not happening eventhough the table is displaying all rows. [ September 13, 2006: Message edited by: Brian Smith ]