1 2 Previous Next 20 Replies Latest reply on Jul 10, 2009 12:52 PM by meghiddo Go to original post
      • 15. Re: Need help deciding on data type for rich:tree and how to
        nbelaevski

        You can put rich:treeNode just inside rich:treeNodesAdaptor. There are examples in documentation.

        • 16. Re: Need help deciding on data type for rich:tree and how to

          you mean something like :

          <rich:treeNode>
          <rich:treeNodesAdaptor nodes="#{project.name}" />
          <rich:treeNode>


          ?

          It seems like I did try that already but I dont remember what wouldnt work about it. Ill try again and try to find the examples your talking about (I think I already have found it actually, I seem to remember this same conversation in the past with you. I will have to find that old post)

          • 17. Re: Need help deciding on data type for rich:tree and how to

            or wait you probably actually mean:

            <rich:treeNodesAdaptor nodes="#{project.name}">
             <rich:treeNode>
             <h:outputText value="#{project.name}" />
             </rich:treeNode>
            </rich:treeNodesAdaptor>


            from the way you word it there

            • 18. Re: Need help deciding on data type for rich:tree and how to

              yes that second version worked...
              guess what?

              This tree now works as intended after these 3 months of me posting on this forum for help!

              There are a few small things, but they are fine for first iteration of this project.

              Thanks very much

              • 19. Re: Need help deciding on data type for rich:tree and how to

                OK here is the latest version and I do have one other quick question, I think I need to use rich:recursiveTreeNodesAdaptor for value="#{item.devicesList}" because it is a List rather than String value, is this the correct way to use recursiveTreeNodesAdaptor?

                <rich:tree>
                 <rich:treeNodesAdaptor nodes="#{nodesBean.projects}" var="item">
                 <rich:treeNode>
                 <h:outputText value="#{item.projectName}" />
                 </rich:treeNode>
                 <rich:treeNodesAdaptor nodes="#{item.devicesList}">
                 <rich:treeNode>
                 <h:outputText value="#{item.devicesList}" />
                 </rich:treeNode>
                 </rich:treeNodesAdaptor>
                 </rich:treeNodesAdaptor>
                 </rich:tree>


                Otherwise, if I expand a node that has more than one device in the list it is going to have all those devices listed on one line right?

                • 20. Re: Need help deciding on data type for rich:tree and how to

                  I believe this should do it right:

                  <rich:tree>
                   <rich:treeNodesAdaptor nodes="#{nodesBean.projects}" var="project">
                   <rich:treeNode>
                   <h:outputText value="#{project.projectName}" />
                   </rich:treeNode>
                   <rich:recursiveTreeNodesAdaptor roots="#{project.devicesList}" var="device">
                   <rich:treeNode>
                   <h:outputText value="#{device}" />
                   </rich:treeNode>
                   </rich:recursiveTreeNodesAdaptor>
                   </rich:treeNodesAdaptor>
                   </rich:tree>


                  ?

                  1 2 Previous Next