2 Replies Latest reply on Oct 15, 2008 9:55 AM by Linda Giordano

    RecursiveTreeNodeAdaptor only expands 1 level

    Linda Giordano Newbie

      I'm using Rich:recursivetreenodeadaptor to recursively display the nodes in a tree. Since we can have any number of levels, and each node object is the same, this seemed like the most appropriate tag to use.

      The problem is, the page is only displaying the root node, and the root's children as leaves to the root node. I can't expand any further.

      My list, placeList, is a List of TestNode objects. Really placeList only contains the root node, and all of the children and children of children are off this node, buried in the 'children' list objects within TestNode.

      I've run the creation of the placeList object in the debugger, and it is being appropriately populated.

      My data object is as follows:

      public class TestNode {
       private int id;
       private String name;
       private List<TestNode> children;
      ...getters and setters

      My page snippet is as follows:
      <rich:tree switchType="client">
       <rich:recursiveTreeNodesAdaptor roots="#{placeAction.placeList}"
       <rich:treeNode data="#{node.id}">
       <h:outputText value="#{node.name}"/>

      Any help on this would be great!