1 Reply Latest reply on Nov 6, 2007 9:28 PM by jvinson

    Creating a Tree Dynamically

    dwheeler

      I've recently used the example code from the Richfaces Live Demo to recreate that tree in my own JSP page. What I need to do, however, is to create a tree from the backing bean. Looking through the Developer's guide and examples all I have been able to find is the following:

      HtmlTree tree = new HtmlTree();

      Although this is a start, it really doesn't give me enough information to create a working tree dynamically. I know I need to have something similar to the following in the JSP:
      <rich:tree binding="#{treeBuilder.tree}"/>

      I don't, however, know how to add nodes to the HtmlTree and add HtmlOutputTexts to the HtmlTreeNodes in order to display text for those nodes. Could somone please give me an example of how to do this in the backing bean? Thank you in advance.