Last page of t:dataScroller results produces error with t:dataTable
-------------------------------------------------------------------

                 Key: TOMAHAWK-677
                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-677
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Data Scroller, Extended Datatable
    Affects Versions: 1.1.4-SNAPSHOT
            Reporter: Richard J. Barbalace


t:dataScroller requires that the "rows" attribute be set on the UI Data 
component.  For t:dataTable, setting this to a fixed value may produce an error 
when jumping to the last page of results.  Setting this to a dynamic value 
creates a different problem when jumping to the last page of results.

For example, I have a dataScroller controlling a dataTable with the setting 
rows="20".  If the dataTable has 5426 rows total, the last page will have 6 
rows.  Since this is not equal to the 20 rows requested, dataTable produces 
error and warning log messages of:
ERROR org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlTableRendererBase - 
Row is not available. Rowindex = 5426
WARN  org.apache.myfaces.shared_impl.renderkit.html.HtmlResponseWriterImpl - 
HTML nesting warning on closing tbody: element tr rendered by component : 
{Component-Path : ...} not explicitly closed

This problem is not visible to the user, but can quickly fill log files and 
cause much nuisance.  Note that this problem can be seen with even one page of 
results, if the number of rows is less than that specified.

If instead of using a fixed row count, I create a backing bean method to 
calculate the correct number of rows for the last page, a worse problem occurs. 
 The number of pages of results should be 272 (=5426/20 rounded up).  The page 
display works properly until the last page is rendered.  Then, since the number 
of rows becomes 6 instead of 20, going from the penultimate page to the last 
page jumps the display from page 271 to page 905 (=5426/6 rounded up).  Going 
back a page causes more confusion, as the number of rows changes again to yet a 
different number.

This problem is user visible, and worsens the user experience.

I have not found a suitable work around for the interaction between 
dataScroller and dataTable.  If there is one, please let me know.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to