You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Cristiano Kliemann (JIRA)" <ji...@apache.org> on 2007/12/10 04:49:43 UTC

[jira] Updated: (WICKET-1216) IDataProvider.size being called after DataView.setItemsPerPage

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

Cristiano Kliemann updated WICKET-1216:
---------------------------------------

       Priority: Minor  (was: Major)
    Description: 
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.

  was:
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" clause 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.


> 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
>            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.