1 Reply Latest reply on Jun 28, 2010 7:28 AM by Ilya Shaikovsky

    rich:tree - how to get access to node identifier

    boraldo@mail.ru boraldo@mail.ru Newbie

      I use the following code for building tree:

      public class MyBean {
           public TreeNode getTree(){
                TreeNode<T> node = new TreeNodeImpl<T>();
                ...
                node.addChild(mykey, mynode);
                ...
                return node;
           }
      }
      
      
      

       

      In page:

      <rich:tree value="#{mybean.tree}" var="item">
           <rich:treeNode>
                <h:outputText value="#{item}"/>
           </rich:treeNode>
      </rich:tree>
      

       

      Here object denoted by mynode injects to variable item.

      Which variable should I use to get access to an object denoted by mykey?