You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Juergen Donnerstag (JIRA)" <ji...@apache.org> on 2009/04/12 23:36:16 UTC

[jira] Resolved: (WICKET-2181) Bounds error in PageableListView#getCurrentPage()

     [ https://issues.apache.org/jira/browse/WICKET-2181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Juergen Donnerstag resolved WICKET-2181.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.4-RC3
         Assignee: Juergen Donnerstag

tested with library example by removing the last two entries. Before the change a empty 3rd page is present, which effectively doesn't exist. After that change page 2 is render after removing the two entries.

> Bounds error in PageableListView#getCurrentPage()
> -------------------------------------------------
>
>                 Key: WICKET-2181
>                 URL: https://issues.apache.org/jira/browse/WICKET-2181
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>            Reporter: Julián Mauro Luini
>            Assignee: Juergen Donnerstag
>             Fix For: 1.4-RC3
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> In the getCurrentPage() method of class PageableListView, the following code:
> while ((currentPage * rowsPerPage) > getList().size())
> {
>            currentPage--;
> }
> checks if "first cell if out of range". However, the index of that first cell is (currentPage * rowsPerPage), and then the comparison with getList().size() should use a ">=" instead a ">".

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.