Uploaded image for project: 'MyFaces Tomahawk'
  1. MyFaces Tomahawk
  2. TOMAHAWK-677

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.1.4-SNAPSHOT
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            richie Richard J. Barbalace
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: