You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2013/05/27 20:20:22 UTC

[jira] [Commented] (WICKET-5184) Change signature of AbstractTree

    [ https://issues.apache.org/jira/browse/WICKET-5184?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13667893#comment-13667893 ] 

Martin Grigorov commented on WICKET-5184:
-----------------------------------------

Here is a clean solution to solve the problem in the application code:

Set<Foo> set = new HashSet<>();
		add(new DefaultNestedTree<Foo>("tree", new FooProvider(), new SetModel<>(set))

I'm not sure why Model.ofXyz() methods require "? extends C".
                
> Change signature of AbstractTree
> --------------------------------
>
>                 Key: WICKET-5184
>                 URL: https://issues.apache.org/jira/browse/WICKET-5184
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket-extensions
>    Affects Versions: 6.7.0
>            Reporter: Ilia Naryzhny
>            Priority: Minor
>             Fix For: 7.0.0
>
>
> There is following problem in wicket 6 with trees:
> Constructor of class org.apache.wicket.extensions.markup.html.repeater.tree.AbstractTree have following signature:
> protected AbstractTree(String id, ITreeProvider<T> provider, IModel<Set<T>> state)
> The problem is in "IModel<Set<T>> state" argument and fact that Model.ofSet return IModel<Set<? extends C>>, so it's not possible directly pass IModel<Set<? extends C>> to constructor. It seems that either Model.ofSet should be changed or AbstractTree.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira