-
1. Re: unable to code a link on a tree node.
ilya_shaikovsky May 12, 2008 11:28 AM (in response to jbarbeau)treeNode childs defines markup for the node. So you might have all you need inside the node. It's tested in our samples. Provide please more info about the way you trying to implement your tree.
-
2. Re: unable to code a link on a tree node.
jbarbeau May 12, 2008 11:45 AM (in response to jbarbeau)test.xhtml:
<rich:tree value="#{testTreeBean.rootNode}" switchType="client" id="tree">
</rich:tree>
TestTreeBean.java
buildTree(){
rootNode = new TreeNodeImpl();
rootNode.setData("ROOT HERE");
//rootNode.setParent(rootNode);
TreeNodeImpl accting = new TreeNodeImpl();
accting.setData("ACCOUNTING");
TreeNodeImpl queries = new TreeNodeImpl();
queries.setData("SAS");
TreeNodeImpl scn51150 = new TreeNodeImpl();
scn51150.setData("SCN51150");
queries.addChild("scn51150", scn51150);
//queries.setParent(queries);
TreeNodeImpl menu3 = new TreeNodeImpl();
menu3.setData("MENU 3");
TreeNodeImpl paper = new TreeNodeImpl();
//paper.setData("PAPER");
//HtmlOutputLink link = new HtmlOutputLink();
//HtmlCommandLink link = new HtmlCommandLink();
//link.setTarget("detail");
//link.setRel("stub.xhtml");
//link.setId("paper");
//link.setValue("FRED WAS HERE");
paper.setData("Home");
menu3.addChild("5", paper);
TreeNodeImpl menu2 = new TreeNodeImpl();
menu2.setData("MENU2");
menu2.addChild("4", menu3);
//level1.addChild("2", level2);
rootNode.addChild("1", accting);
rootNode.addChild("2", queries);
rootNode.addChild("3", menu2);
}
This was my last attempt - basically I want each node to bring up a different page when selected. Thanks for your help! -
3. Re: unable to code a link on a tree node.
rajarchu May 15, 2008 11:45 AM (in response to jbarbeau)Hello any body have an idea... abt the link...