You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Federico Fanton <ff...@ibc.it> on 2007/11/20 15:57:01 UTC

Using LinkTree to show subtrees

Hi everyone!
I'm looking for a hint please :)
I have a somewhat complex chain of TreeNodes that I need to show by subtree (not in its entirety), so I figured I'd just find my "subroot" TreeNode, wrap it in a DefaultTreeModel and pass it to a LinkTree.. Everything is fine, except that clicking on nodes doesn't expand them.
I think this is because AbstractTree.isNodeVisible() walks up the treenodes from parent to parent until it hits the topmost one, but it ignores that my TreeModel root could be different from the "real" root.. I figure I could alter the treeState by hand and expand all the nodes that lead to the subroot, but I think it's not a very clean solution.. Since isNodeVisible() is final I can't override it, but maybe it would be a patch worth including in Wicket itself?
Thanks for your time!


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org