1 Reply Latest reply on Feb 20, 2008 11:46 PM by eldeano

    treeNode default expand

    eldeano

      Hi Guys

      I have a tree that looks like

      <rich:tree
       id="programMenuTree"
       binding="#{programTreeHandler.tree}"
       switchType="ajax"
       value="#{programTreeHandler.rootNode}"
       var="item"
       nodeFace="#{item.type}"
       showConnectingLines="false"
       style="width:200px"
       advisedNodeOpened="#{programTreeHandler.adviseNodeOpened}">
       <rich:treeNode type="root" iconLeaf="/images/programMenu/root-icon.gif" icon="/images/programMenu/root-icon.gif">
       <a4j:commandLink immediate="true" value="#{item}" action="searchResults" actionListener="#{programTreeHandler.processSelection}"/>
       </rich:treeNode>
       <rich:treeNode type="channel" icon="/images/programMenu/#{item}-icon.gif" iconLeaf="/images/programMenu/#{item}-icon.gif">
       <a4j:commandLink immediate="true" value="#{item}" action="searchResults" actionListener="#{programTreeHandler.processSelection}"/>
       </rich:treeNode>
       <rich:treeNode type="program" iconLeaf="/images/programMenu/program-icon.gif">
       <a4j:commandLink immediate="true" value="#{item}" action="searchResults" actionListener="#{programTreeHandler.processSelection}"/>
       </rich:treeNode>
       </rich:tree>
      


      Basically it renders a tree with a format:

      Channels (type:root)
      __ -- ABC (type:channel)
      ____ -- MyProgram (type:program)


      Basically I want the tree to load up with the first level visible.
      Currently the tree is rendered

      + Channels

      I want it to render

      -- Channels
      __ + ABC
      __ + SBS
      __ + FOX

      Is there any way i can default a TreeNode to expanded?

      Cheers