What's the way to find a specific (known wicket id) Wicket Component within a Page regarding less effort performance?
Get a specific Wicket Component within a Page
Asked Answered
Your options are:
- The get() method of the component which searches for a component at a specific path.
- An iterator() on the MarkupContainer which has all his children.
- Use the visitChildren() that has all children and grandchildren of a
MarkupContainer.
visitChildren()
returns ComponentHierachyIterator which in turn has a method which has a method filterById() that returns anotherComponentHierachyIterator
with the filtered component(s).
Links are broken. –
Bisitun
The
ComponentHierachyIterator
is deprecated. –
Grandfatherly © 2022 - 2024 — McMap. All rights reserved.
get()
method from my answer. Otherwise you have to go withvisitChildren()
– Dialectology