[ 
https://issues.apache.org/jira/browse/WICKET-1216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12550750
 ] 

Cristiano Kliemann commented on WICKET-1216:
--------------------------------------------

Sorry, I was looking at rc1 code. Next time I will check trunk first.

Actually, the short circuit was implemented on 04/Nov/2007, rev 591860 
(pre-rc1).

> IDataProvider.size being called after DataView.setItemsPerPage
> --------------------------------------------------------------
>
>                 Key: WICKET-1216
>                 URL: https://issues.apache.org/jira/browse/WICKET-1216
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-rc1
>            Reporter: Cristiano Kliemann
>            Assignee: Igor Vaynberg
>            Priority: Minor
>
> DataView.setItemsPerPage shouldn't call IDataProvider.size(). It happens 
> because it indirectly resets the current page back to zero, calling 
> AbstractPageableView.setCurrentPage, which checks the page count.
> Perhaps changing the "if" statement of AbstractPageableView.setCurrentPage 
> from:
> if (page < 0 || (page >= getPageCount() && getPageCount() > 0))
> to:
> if (page < 0 || (page > 0 && page >= getPageCount() && getPageCount() > 0))
> I think it shouldn't check the page count if the page being set is 0.

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

Reply via email to