[
https://issues.apache.org/jira/browse/WICKET-1216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor Vaynberg reassigned WICKET-1216:
-------------------------------------
Assignee: Igor Vaynberg
> 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.