instead of navigating between pages and passing the tree state around why not simply swap panels. that way the tree instance is the same and keeps its state.
-igor On Mon, Aug 17, 2009 at 8:23 AM, Haulyn R. Jason<[email protected]> wrote: > Yes, that's right, is that a way to tell the new page(and the new instance > of the tree), the status of the old tree? > I means expand the node which I clicked? > > Thanks! > > > On Sat, Aug 15, 2009 at 9:00 AM, jWeekend <[email protected]>wrote: > >> >> Is your menu (tree) in some parent page class that both the first and the >> linked-to page extend? When you go to a new page instance you will get a >> new >> instance of the Tree. >> >> Regards - Cemal >> jWeekend >> OO & Java Technologies, Wicket Training and Development >> http://jWeekend.com >> >> >> Haulyn Jason-2 wrote: >> > >> > No, just use Tree in extension package. >> > >> > On Fri, Aug 14, 2009 at 11:17 PM, Igor Vaynberg >> > <[email protected]>wrote: >> > >> >> are you using LinkTree? >> >> >> >> -igor >> >> >> >> On Fri, Aug 14, 2009 at 12:15 AM, Haulyn R. Jason<[email protected]> >> >> wrote: >> >> > Hi,all: >> >> > >> >> > I design a page with a tree for page navigation. But I can not find >> >> more >> >> > information from Internet to learn how to use the Tree component. >> >> > >> >> > I can display the tree as >> >> > >> >> > menu1 >> >> > |-sub_menu1 >> >> > |-sub_menu2 >> >> > menu2 >> >> > |-sub_menu3 >> >> > |-sub_menu4 >> >> > >> >> > and I remove root node, make all tree expand while init the tree, but >> I >> >> do >> >> > not know how to add links to the sub_menus, I tried to add some code >> >> like >> >> > this: >> >> > �...@override >> >> > protected void onNodeLinkClicked(AjaxRequestTarget target, >> >> > TreeNode node) { >> >> > DefaultMutableTreeNode treeNode = >> >> (DefaultMutableTreeNode) >> >> > node; >> >> > NavigationTreeNode navigationTreeNode = >> >> (NavigationTreeNode) >> >> > treeNode.getUserObject(); >> >> > if (navigationTreeNode.isURL) { >> >> > setResponsePage(navigationTreeNode.getURL()); >> >> > super.onNodeLinkClicked(target, node); >> >> > } else { >> >> > super.onNodeLinkClicked(target, node); >> >> > } >> >> > } >> >> > >> >> > this looks work well, but when I clink on a link, the page redirect to >> >> the >> >> > target page, but I can not keep the tree with the selected node >> expand. >> >> > >> >> > Can anyone help me or give me some reference URLs? Thanks! >> >> > >> >> > -- >> >> > ------------------ >> >> > Enjoy. Thanks! >> >> > >> >> > Mobile: +086-15864011231 >> >> > email: [email protected], [email protected] >> >> > website: http://haulynjason.net >> >> > gtalk: [email protected] >> >> > yahoo: [email protected] >> >> > msn: [email protected] >> >> > skype: saharabear >> >> > QQ: 378606292 >> >> > >> >> > Haulyn Jason >> >> > >> >> >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: [email protected] >> >> For additional commands, e-mail: [email protected] >> >> >> >> >> > >> > >> > -- >> > ------------------ >> > Enjoy. Thanks! >> > >> > Mobile: +086-15864011231 >> > email: [email protected], [email protected] >> > website: http://haulynjason.net >> > gtalk: [email protected] >> > yahoo: [email protected] >> > msn: [email protected] >> > skype: saharabear >> > QQ: 378606292 >> > >> > 贾昊林 Haulyn Jason >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/how-to-use-wicket-tree-in-extension-tp24967306p24980702.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] >> >> > > > -- > ------------------ > Enjoy. Thanks! > > Haulyn Microproduction > > Mobile: +086-15864011231 > email: [email protected], > [email protected] > website: http://haulynjason.net > gtalk: [email protected] > yahoo: [email protected] > msn: [email protected] > skype: saharabear > QQ: 378606292 > > Haulyn Jason > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
