2 Replies Latest reply on Nov 16, 2007 8:45 AM by Eduard Demerchyan

    rich:usage

    Eduard Demerchyan Newbie

      I use rich:tree component but i don't understand what mean nested rich:treeNode element and there type attribute, I seem this is something like tomahawk tree2 nested facet but where is i set node type?
      Thank for reply

        • 1. Re: rich:usage
          Ilya Shaikovsky Master

           

          <rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
           <rich:treeNode type="artist" iconLeaf="/images/tree/singer.gif" icon="/images/tree/singer.gif">
           <h:outputText value="#{item.name}" />
           </rich:treeNode>
           <rich:treeNode type="album" iconLeaf="/images/tree/disc.gif" icon="/images/tree/disc.gif">
           <h:outputText value="#{item.title}" />
           </rich:treeNode>
           <rich:treeNode type="song" iconLeaf="/images/tree/song.gif" icon="/images/tree/song.gif">
           <h:outputText value="#{item.title}" />
           </rich:treeNode>
           </rich:tree>


          so nodeFace attribute - defines the corresponding treeNode to represent every object from the tree. And type attribute on treeNode should have one of the types that #{item.type} will return.

          Check please demosite and documentation to get more info.

          • 2. Re: rich:usage
            Eduard Demerchyan Newbie

            In this case i need implement TreeNode interface or extends TreeNodeImpl to add some field, set it when create nodes and bind this field to nodeFace attribute?