Hi, I will certainly look at this once i have some spare time. -Matej
On Sat, Feb 23, 2008 at 2:09 PM, Kent Tong <[EMAIL PROTECTED]> wrote: > > > Sebastiaan van Erk wrote: > > > > Ok, thanks for the quick reply. :-) > > > > https://issues.apache.org/jira/browse/WICKET-1366 > > > > I've added some comments to it. For a workaround, try: > > tree = new LinkTree("t", model) { > protected Component newNodeComponent(String id, IModel model) { > return new LinkIconPanel(id, model, this) { > protected void onNodeLinkClicked(TreeNode node, > BaseTree tree, AjaxRequestTarget > target) { > tree.getTreeState().selectNode(node, > > !tree.getTreeState().isNodeSelected(node)); > onClicked(node, tree, target); > } > protected Component newContentComponent(String > componentId, > BaseTree tree, IModel model) { > return new Label(componentId, > getNodeTextModel(model)); > } > }; > } > > protected void onClicked(TreeNode node, BaseTree tree, > > AjaxRequestTarget target) { > if (!node.isLeaf()) { > if (tree.getTreeState().isNodeExpanded(node)) { > collapseAll(node); > } else { > expandAll(node); > } > tree.updateTree(target); > } else { > System.out.println(Arrays > .toString(((DefaultMutableTreeNode) > node) > > .getUserObjectPath())); > } > } > }; > > > > ----- > -- > Kent Tong > Wicket tutorials freely available at http://www.agileskills2.org/EWDW > Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA > -- > View this message in context: > http://www.nabble.com/Wicket-LinkTree-subtree-collapse-expand-tp15639680p15651849.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Resizable and reorderable grid components. http://www.inmethod.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
