Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.0
    • Fix Version/s: 1.1
    • Component/s: Paging/Sorting
    • Labels:
      None
    • Application server:
      Apache Tomcat / v. 1.18

      Description

      I've found a problem in method getPageNavigationBar(Href, String).

      The problem is calculationg the startPage. Here is an example that fails (you could find many more, try changing groupSize to 5 ;-):

              groupSize=8
              currentPage=9
              fullListSize=224
              pageCount=12
              pageSize=20
         startPage should be 5 and was 4 (we could never see page 12)
         with this path we can

      The current version:

      startPage = Math.max(Math.min(this.currentPage - groupSize / 2, this.pageCount - groupSize), 1);
      endPage = Math.min(startPage + groupSize - 1, this.pageCount);

      The pathed one:

      startPage = Math.max(Math.min(this.currentPage - groupSize / 2, this.pageCount - groupSize), 1);
      //patch
      if (this.pageCount - this.currentPage < groupSize/2 + (groupSize%2>0?1:0)) startPage++;
      //end patch
      endPage = Math.min(startPage + groupSize - 1, this.pageCount);

        Activity

        Hide
        fabrizio giustina added a comment -
        same as DISPL-213
        fixed in CVS for 1.1
        Show
        fabrizio giustina added a comment - same as DISPL-213 fixed in CVS for 1.1

          People

          • Reporter:
            Rubén Suárez Alvarez
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: