Re: Problem with dynamic insertion to Tree
PSkarthic wrote: Thanks for your reply i have been waiting for long time target.addComponent(this); also does not solved my problem. if i click a node the child is created under the node but doesn't expanded but when i click it second time then it expands but with two child. For me @Override protected void onNodeLinkClicked ( AjaxRequestTarget pTarget, TreeNode pNode) { [...] myNavigationTree.getTreeState().expandNode ( pNode); [...] } solved that problem. Where pNode is the (sub-tree-) root node under which new nodes have been added dynamically. -- View this message in context: http://www.nabble.com/Problem-with-dynamic-insertion-to-Tree-tp21474815p23776501.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Panel switching in LinkTree.onNodeLinkClicked() doesn't work
Im using a org.apache.wicket.extensions.markup.html.tree.Tree now instead of a LinkTree. This seems to work. Don't forget to call setOutputMarkupId ( true) for all panels before they get displayed. -- View this message in context: http://www.nabble.com/Panel-switching-in-LinkTree.onNodeLinkClicked%28%29-doesn%27t-work-tp23708299p23738359.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Panel switching in LinkTree.onNodeLinkClicked() doesn't work
Andreas Bürgel (Bucyrus) wrote: Im using a org.apache.wicket.extensions.markup.html.tree.Tree now instead of a LinkTree. This seems to work. Don't forget to call setOutputMarkupId ( true) for all panels before they get displayed. I forgot to say that had to add the panel to the AjaxRequestTarget to make it really work: -8- protected void onNodeLinkClicked ( AjaxRequestTarget pTarget, TreeNode pNode) { NavigationTreeNode lNode = (NavigationTreeNode) pNode; switch ( lNode.getType ()) { case PANEL: System.out.println ( PANEL_NODE); Object lPayLoad = lNode.getPayLoad (); setMainPanel ( lMMCSystemPanel); if ( null != pTarget) { pTarget.addComponent ( lMMCSystemPanel); } break; -8-- Enough said on this issue, I hope. -- View this message in context: http://www.nabble.com/Panel-switching-in-LinkTree.onNodeLinkClicked%28%29-doesn%27t-work-tp23708299p23738707.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org