[
https://issues.apache.org/jira/browse/WICKET-1766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12619787#action_12619787
]
Rik van der Kleij commented on WICKET-1766:
-------------------------------------------
Hi Igor,
Thanks for your explanation.
I do not understand the situation completely. It can be mine lack of how Wicket
works internally but I have some remarks about the situation you describe.
You describe a situation in which size becomes incorrect but after 2.1 in 4
size is accessed again so it will retrieve a new value. Also iterator() is
doing the real work. I can imagine that size() is used for creating the
navigation links.
Size is called before onclick (step 1). You write that that is unavoidable but
to me it seems that size has two different functions, getting the total number
of items and performing security checks. Separation of concerns.
Rik
> Method size() of a data provider is invoked twice.
> --------------------------------------------------
>
> Key: WICKET-1766
> URL: https://issues.apache.org/jira/browse/WICKET-1766
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.4
> Environment: Ubuntu
> Reporter: Rik van der Kleij
> Assignee: Igor Vaynberg
> Priority: Minor
> Fix For: 1.3.5
>
>
> Method size() of a data provider is invoked twice during one request. This
> happens when navigating to a next or latest page in a data table. During
> debugging I noticed that the onDetach() of AbstractPageableView is invoked an
> extra time. Implementations of size() normally query the database so it will
> slow down the performance.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.