You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Thomas Götz (JIRA)" <ji...@apache.org> on 2012/05/22 22:25:41 UTC
[jira] [Updated] (WICKET-4568) Caching of itemCount incorrect in
AbstractPageableView
[ https://issues.apache.org/jira/browse/WICKET-4568?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Götz updated WICKET-4568:
--------------------------------
Attachment: WICKET-4568.patch
Patch added.
> Caching of itemCount incorrect in AbstractPageableView
> ------------------------------------------------------
>
> Key: WICKET-4568
> URL: https://issues.apache.org/jira/browse/WICKET-4568
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.6, 6.0.0-beta1
> Reporter: Thomas Götz
> Priority: Minor
> Attachments: WICKET-4568.patch
>
>
> In AbstractPageableView.getItemCount() the result of dataprovider.size() is cached to avoid potentially expensive calls. While paging (e.g. from page 1 to page 2) dataprovider.size() is called twice anyhow. The reason for this is the call to clearCachedItemCount() in AbstractPageableView.onBeforeRender(). This call is obsolete as far as I can see, as clearCachedItemCount() is also called in AbstractPageableView.onDetach().
> I tested this with the wicket-examples (DataTablePage) and the deletion of the call to clearCachedItemCount() in onBeforeRender() seems to have no side effects. Maybe someone could confirm this?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira