0 Replies Latest reply on Apr 18, 2011 6:11 AM by Robby Iven

    Select first node in rich:tree

    Robby Iven Newbie

      Hi everybody,

       

      I have a question regarding a rich tree.

       

      When the user browses to the application, he must first make a selection of which data he needs. When he presses ok, the second page appears containing a rich:tree. Next to the three ar some charts which are rendered in function of what was clicked/selected in the tree.

       

      What I like to do is when the second page initially loads after selection, the first node becomes selected and the charts are rendered.

       

      I've tried googling and found something on TreeStateAdvisor, but that doesn't seem to work.

       

      Can anybody help me?

       

      1. <rich:tree style="width:300px" nodeSelectListener="#{pathTreeBean.processSelection}"  
      2.         switchType="client" ajaxSingle="true" adviseNodeSelected="#{pathTreeAdvisor.adviseNodeSelected}" 
      3.         value="#{pathTreeBean.treeNode}" var="item" ajaxKeys="#{null}"
      4.     <rich:treeNode> 
      5.         <h:commandLink value="#{item.name}"/> 
      6.     </rich:treeNode> 
      7. </rich:tree> 

       

      Thanks