Message: A new issue has been created in JIRA.
--------------------------------------------------------------------- View the issue: http://jira.codehaus.org/browse/DISPL-185 Here is an overview of the issue: --------------------------------------------------------------------- Key: DISPL-185 Summary: SmartListHelper patch Type: Bug Status: Unassigned Priority: Major Original Estimate: 0 minutes Time Spent: Unknown Remaining: 0 minutes Project: DisplayTag Components: Paging/Sorting Versions: 1.0 Assignee: Reporter: Rubén Suárez Alvarez Created: Thu, 10 Feb 2005 12:22 PM Updated: Thu, 10 Feb 2005 12:22 PM 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); --------------------------------------------------------------------- JIRA INFORMATION: 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 If you want more information on JIRA, or have a bug to report see: http://www.atlassian.com/software/jira ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ displaytag-devel mailing list displaytag-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/displaytag-devel