3 Replies Latest reply on May 15, 2008 11:45 AM by rajesh ninganola

    unable to code a link on a tree node.

    Janet Barbeau Newbie

      I have been using the TreeNodeImpl to construct a tree - I get the tree -however I am not finding a way to add a link onto the nodes. Other jsf tree implementations are quite simple to do this - you start with the tree, add nodes & add a link to the nodes you want to have links. Trees in richfaces do not seem to be this straight forward. Is there someother impl I should be using. Thanks!

        • 1. Re: unable to code a link on a tree node.
          Ilya Shaikovsky Master

          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.
            Janet Barbeau Newbie


            <rich:tree value="#{testTreeBean.rootNode}" switchType="client" id="tree">


            rootNode = new TreeNodeImpl();

            rootNode.setData("ROOT HERE");

            TreeNodeImpl accting = new TreeNodeImpl();

            TreeNodeImpl queries = new TreeNodeImpl();

            TreeNodeImpl scn51150 = new TreeNodeImpl();

            queries.addChild("scn51150", scn51150);

            TreeNodeImpl menu3 = new TreeNodeImpl();
            menu3.setData("MENU 3");

            TreeNodeImpl paper = new TreeNodeImpl();
            //HtmlOutputLink link = new HtmlOutputLink();
            //HtmlCommandLink link = new HtmlCommandLink();
            //link.setValue("FRED WAS HERE");


            menu3.addChild("5", paper);

            TreeNodeImpl menu2 = new TreeNodeImpl();
            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.
              rajesh ninganola Newbie

              Hello any body have an idea... abt the link...