2 Replies Latest reply on Jun 23, 2008 9:50 AM by Moshe Elisha

    How to define treeNode for multiple types

    Moshe Elisha Newbie

      Hello,

      I want that a treeNode will handle multiple types, something like this:

      <rich:tree value="#{libraryAjaxTree.data}" var="item" nodeFace="#{item.type}">
      
       <rich:treeNode type="artist,album" >
       <h:outputText value="#{item.name}" />
       </rich:treeNode>
      
       <rich:treeNode type="song" >
       <h:outputText value="#{item.title}" />
       </rich:treeNode>
       </rich:tree>
      


      One way is to create a virtual property "typeGroup" that will check the type in the server and that property will be used in the nodeFace attribute.

      But is there a nicer way?