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

DataScoller - FastForward has borderline issues

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.5
    • 1.1.7
    • Data Scroller
    • None

    Description

      In certain cases the Fast forward works incorrectly, resulting in an empty table.
      For instance you have 100 rows, 10 per page, fastforward set to 10.
      You start off on the first page, then fast forward.

      Due to a little bug in the page calculation, you will end up on page 11, which is empty.

      Proposed fix:
      snip from HtmlDataScroller broadcast – see the line commented with //fix here

      else if (FACET_FAST_FORWARD.equals(facet))

      { int fastStep = getFastStep(); if (fastStep <= 0) fastStep = 1; int next = uiData.getFirst() + uiData.getRows() * fastStep; int rowcount = uiData.getRowCount(); if (next >= rowcount) //fix here >= instead of > next = (rowcount - 1) - ((rowcount - 1) % uiData.getRows()); setFirst(uiData, next); }

      Attachments

        1. TOMAHAWK-1009_proposed.patch
          0.9 kB
          Lars Ködderitzsch

        Activity

          People

            cagatay_civici Cagatay Civici
            lkoe Lars Ködderitzsch
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: