0 Replies Latest reply on Jun 19, 2008 8:16 PM by cyberrbt

    Rich Tree Logic

    cyberrbt

      I do not find an example in the livedemo site of a clickable TREE leaf that behaves like an anchor. There is one example of a tree that outputs the selected node to an outputText OUTSIDE the rich tree. When I try to use a treeNode inside the Tree to create a leaf anchor, I find that the tree is not rendered until after I click on the leaf.

      The structure that I am trying to accomplish is this:

      Folder1
      ++ Report 1
      ++ Report 2
      Folder2
      ++ Report 3
      ++ Report 4


      Reports 1-4 should be clickable links
      (example: http://ourserver/reports/report1) We do not want to click on a link outside the rich tree to navigate to the reports.

      Here is my current code based on the livedemo code with the link OUTSIDE the rich tree:
      <h:outputLabel value="Rich Tree:" for="rtree1"></h:outputLabel>
      <h:panelGrid id="rtree1" columns="2" width="100%" columnClasses="col1,col2">

      <rich:tree style="width:300px" value="#{simpleTreeBean.treeNode}"
      nodeSelectListener="#{simpleTreeBean.processSelection}"
      ajaxSubmitSelection="true" reRender="tn1,tn2"
      switchType="ajax">

      </rich:tree>
      <rich:separator lineType="double"></rich:separator>
      <h:outputLink id="tn2" value="#{simpleTreeBean.reportURL}">
      <h:outputText id="tn1" value="#{simpleTreeBean.nodeTitle}"></h:outputText>
      </h:outputLink>
      <rich:separator lineType="double"></rich:separator>
      <h:commandButton value="Logoff" action="logoff"></h:commandButton>

      </h:panelGrid>
      What can I do to change this to be able to navigate to another web site by clicking on a tree leaf INSIDE the rich tree?

      Thank you