[ http://jira.codehaus.org/browse/DISPL-185?page=all ]
     
fabrizio giustina closed DISPL-185:
-----------------------------------

     Resolution: Duplicate
    Fix Version: 1.1

same as DISPL-213
fixed in CVS for 1.1

> SmartListHelper patch
> ---------------------
>
>          Key: DISPL-185
>          URL: http://jira.codehaus.org/browse/DISPL-185
>      Project: DisplayTag
>         Type: Bug
>   Components: Paging/Sorting
>     Versions: 1.0
>     Reporter: Rubén Suárez Alvarez
>      Fix For: 1.1

>
> Original Estimate: 0 minutes
>         Remaining: 0 minutes
>
> 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);

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



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
displaytag-devel mailing list
displaytag-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-devel

Reply via email to