Sorry, cant get u.. can you show me the some partial code ? My tree example was refer from the wicket example. but it only shown how to create a tree without some example to click the node and redirect to another page. I had tried search from the forum and do testing... still failed. Can everybody give ma some guide ? Maybe i am new to the wicket.. anyway, it is fun to learn and play around :)
thanks igor.vaynberg wrote: > > On 7/2/07, kenixwong <[EMAIL PROTECTED]> wrote: >> >> >> i m using wicket1.2.4 >> >> i done with the nice tree and can display it. Just i did not get any >> resource on the link. Once i click all the node link, i wish to redirect >> to >> different pages that i defined. I had search in the wicket-user forum, >> but >> cant get any result yet. Can u help for it. (btw: i m the new to wicket) > > > > in wicket 1.2.x we do not support setresponsepage() from an ajax request > (which is what i assume is going on since setresponsepage isnt working). > what you have to do instead is > > ajaxtarget.appendjavascript("window.location="+urlfor(MyPage.class)); > > -igor > > > > here is my partial code >> >> final Tree tree = new Tree("tree", treeModel) >> { >> >> >> >> protected String renderNode(TreeNode node) >> { >> DefaultMutableTreeNode treeNode = >> (DefaultMutableTreeNode)node; >> return String.valueOf(treeNode.getUserObject()); >> } >> >> >> protected void nodeLinkClicked(DefaultMutableTreeNode node) >> { >> DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode)node; >> setResponsePage(ReportTreePanel.class); >> >> } >> >> }; >> >> >> >> >> Eelco Hillenius wrote: >> > >> >> Can anyone give me an example of override onNodeLinkClicked(...) for >> >> display >> >> the tree. I want to click the menu intree structure. It's fine i can >> did >> >> it >> >> now. But i cant setResponce to another page when i clicked on the >> link.. >> >> thanks in future >> > >> > So calling setResponsePage (to another page I pressume) doesn't work >> > in the link clicked handler of the tree component? I wouldn't know how >> > this might be a problem tbh. >> > >> > Which version of Wicket are you using, and which tree component (from >> > the core project or the extensions project)? >> > >> > Eelco >> > >> > >> ------------------------------------------------------------------------- >> > This SF.net email is sponsored by DB2 Express >> > Download DB2 Express C - the FREE version of DB2 express and take >> > control of your XML. No limits. Just data. Click to get it now. >> > http://sourceforge.net/powerbar/db2/ >> > _______________________________________________ >> > Wicket-user mailing list >> > Wicket-user@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/wicket-user >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/Tree---override-onNodeLinkClicked%28...%29--tf4010264.html#a11391373 >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by DB2 Express >> Download DB2 Express C - the FREE version of DB2 express and take >> control of your XML. No limits. Just data. Click to get it now. >> http://sourceforge.net/powerbar/db2/ >> _______________________________________________ >> Wicket-user mailing list >> Wicket-user@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/wicket-user >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > > -- View this message in context: http://www.nabble.com/Tree---override-onNodeLinkClicked%28...%29--tf4010264.html#a11424058 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user