Thomas Götz created WICKET-4568:
-----------------------------------

             Summary: 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: 6.0.0-beta1, 1.5.6
            Reporter: Thomas Götz
            Priority: Minor


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


Reply via email to