You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Martin Grigorov <mg...@apache.org> on 2014/03/17 11:09:59 UTC
Future of org.apache.wicket.util.iterator.ComponentHierarchyIterator
Hi,
Juergen has introduced component hierarchy iterators with
https://issues.apache.org/jira/browse/WICKET-3789 to simplify the hierarchy
traversal via IVisitor.
Unfortunately AbstractHierarchyIterator has a bug that doesn't allow its
usage in a page with many components - it uses a recursion [1].
AbstractHierarchyIterator#hasNext() uses #moveDown() and vice versa.
At the moment org.apache.wicket.MarkupContainer#visitChildren()
and org.apache.wicket.MarkupContainer#visitChildren(java.lang.Class<?>)
use ComponentHierarchyIterator so they may not work for complex pages.
Should we deprecate the iterators and remove their usage in Wicket codebase
now and the classes themselves in Wicket 8 ?
Or someone wants to improve the way the component iterators work and fix
the problem ?
1. https://issues.apache.org/jira/browse/WICKET-5284.
Martin Grigorov
Wicket Training and Consulting
Re: Future of org.apache.wicket.util.iterator.ComponentHierarchyIterator
Posted by Igor Vaynberg <ig...@gmail.com>.
i think the visitors are a simpler solution.
-igor
On Mon, Mar 17, 2014 at 3:09 AM, Martin Grigorov <mg...@apache.org> wrote:
> Hi,
>
> Juergen has introduced component hierarchy iterators with
> https://issues.apache.org/jira/browse/WICKET-3789 to simplify the hierarchy
> traversal via IVisitor.
>
> Unfortunately AbstractHierarchyIterator has a bug that doesn't allow its
> usage in a page with many components - it uses a recursion [1].
>
> AbstractHierarchyIterator#hasNext() uses #moveDown() and vice versa.
>
> At the moment org.apache.wicket.MarkupContainer#visitChildren()
> and org.apache.wicket.MarkupContainer#visitChildren(java.lang.Class<?>)
> use ComponentHierarchyIterator so they may not work for complex pages.
>
>
> Should we deprecate the iterators and remove their usage in Wicket codebase
> now and the classes themselves in Wicket 8 ?
> Or someone wants to improve the way the component iterators work and fix
> the problem ?
>
>
> 1. https://issues.apache.org/jira/browse/WICKET-5284.
>
>
> Martin Grigorov
> Wicket Training and Consulting
Re: Future of org.apache.wicket.util.iterator.ComponentHierarchyIterator
Posted by Sven Meier <sv...@meiers.net>.
Seems I thought of the wrong class.
+1 to proceed as you have suggested.
Sven
On 03/18/2014 08:43 AM, Martin Grigorov wrote:
> Sven,
>
> I am suggesting to rework MarkupContainer#visitChildren() and
> MarkupContainer#visitChildren(java.lang.Class<?>) to use IVisitor and
> deprecate all hierarchy iterators. They will be removed in Wicket 8, not 7,
> so user applications will have plenty of time to remove their usage or to
> convince us that the iterators are useful and should be undeprecated.
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Mon, Mar 17, 2014 at 11:42 PM, Sven Meier <sv...@meiers.net> wrote:
>
>> Before deciding on it, please let me check its usage in our project first,
>>
>> Sven
>>
>>
>> On 03/17/2014 11:09 AM, Martin Grigorov wrote:
>>
>>> Hi,
>>>
>>> Juergen has introduced component hierarchy iterators with
>>> https://issues.apache.org/jira/browse/WICKET-3789 to simplify the
>>> hierarchy
>>> traversal via IVisitor.
>>>
>>> Unfortunately AbstractHierarchyIterator has a bug that doesn't allow its
>>> usage in a page with many components - it uses a recursion [1].
>>>
>>> AbstractHierarchyIterator#hasNext() uses #moveDown() and vice versa.
>>>
>>> At the moment org.apache.wicket.MarkupContainer#visitChildren()
>>> and org.apache.wicket.MarkupContainer#visitChildren(java.lang.Class<?>)
>>> use ComponentHierarchyIterator so they may not work for complex pages.
>>>
>>>
>>> Should we deprecate the iterators and remove their usage in Wicket
>>> codebase
>>> now and the classes themselves in Wicket 8 ?
>>> Or someone wants to improve the way the component iterators work and fix
>>> the problem ?
>>>
>>>
>>> 1. https://issues.apache.org/jira/browse/WICKET-5284.
>>>
>>>
>>> Martin Grigorov
>>> Wicket Training and Consulting
>>>
>>>
Re: Future of org.apache.wicket.util.iterator.ComponentHierarchyIterator
Posted by Martin Grigorov <mg...@apache.org>.
Sven,
I am suggesting to rework MarkupContainer#visitChildren() and
MarkupContainer#visitChildren(java.lang.Class<?>) to use IVisitor and
deprecate all hierarchy iterators. They will be removed in Wicket 8, not 7,
so user applications will have plenty of time to remove their usage or to
convince us that the iterators are useful and should be undeprecated.
Martin Grigorov
Wicket Training and Consulting
On Mon, Mar 17, 2014 at 11:42 PM, Sven Meier <sv...@meiers.net> wrote:
> Before deciding on it, please let me check its usage in our project first,
>
> Sven
>
>
> On 03/17/2014 11:09 AM, Martin Grigorov wrote:
>
>> Hi,
>>
>> Juergen has introduced component hierarchy iterators with
>> https://issues.apache.org/jira/browse/WICKET-3789 to simplify the
>> hierarchy
>> traversal via IVisitor.
>>
>> Unfortunately AbstractHierarchyIterator has a bug that doesn't allow its
>> usage in a page with many components - it uses a recursion [1].
>>
>> AbstractHierarchyIterator#hasNext() uses #moveDown() and vice versa.
>>
>> At the moment org.apache.wicket.MarkupContainer#visitChildren()
>> and org.apache.wicket.MarkupContainer#visitChildren(java.lang.Class<?>)
>> use ComponentHierarchyIterator so they may not work for complex pages.
>>
>>
>> Should we deprecate the iterators and remove their usage in Wicket
>> codebase
>> now and the classes themselves in Wicket 8 ?
>> Or someone wants to improve the way the component iterators work and fix
>> the problem ?
>>
>>
>> 1. https://issues.apache.org/jira/browse/WICKET-5284.
>>
>>
>> Martin Grigorov
>> Wicket Training and Consulting
>>
>>
>
Re: Future of org.apache.wicket.util.iterator.ComponentHierarchyIterator
Posted by Sven Meier <sv...@meiers.net>.
Before deciding on it, please let me check its usage in our project first,
Sven
On 03/17/2014 11:09 AM, Martin Grigorov wrote:
> Hi,
>
> Juergen has introduced component hierarchy iterators with
> https://issues.apache.org/jira/browse/WICKET-3789 to simplify the hierarchy
> traversal via IVisitor.
>
> Unfortunately AbstractHierarchyIterator has a bug that doesn't allow its
> usage in a page with many components - it uses a recursion [1].
>
> AbstractHierarchyIterator#hasNext() uses #moveDown() and vice versa.
>
> At the moment org.apache.wicket.MarkupContainer#visitChildren()
> and org.apache.wicket.MarkupContainer#visitChildren(java.lang.Class<?>)
> use ComponentHierarchyIterator so they may not work for complex pages.
>
>
> Should we deprecate the iterators and remove their usage in Wicket codebase
> now and the classes themselves in Wicket 8 ?
> Or someone wants to improve the way the component iterators work and fix
> the problem ?
>
>
> 1. https://issues.apache.org/jira/browse/WICKET-5284.
>
>
> Martin Grigorov
> Wicket Training and Consulting
>