6 Replies Latest reply on Mar 26, 2009 11:03 AM by Fabian zur Heide

    rich:tree

    Fabian zur Heide Newbie

      I've created the following code to show a directory structure on the server:

      <rich:tree style="margin: 10px; width: 720px;"
      switchType="client"
      ajaxSubmitSelection="true"
      value="#{treeBean.root}"
      var="node"
      nodeFace="#{node.type}"
      nodeSelectListener="#{selectedItemBean.nodeSelectListener}"
      >
      <rich:treeNode type="parent">
      <h:selectBooleanCheckbox />
      <h:outputText value="#{node.name}"/>
      </rich:treeNode>
      <rich:treeNode type="child"
      onclick="#rich:component('MPanel')}.show() "
      ajaxSingle="true"
      reRender="MPHeader,MPContent"
      >
      <h:selectBooleanCheckbox />
      <h:outputText value="#{node.name}"/>
      </rich:treeNode>
      </rich:tree>

      The problem now is that the "#{treeBean.root}" method is called everytime I click on a node, which maybe time consuming depending on the number of directories and files to scanned. On clicking on a node I only want to invoke a rich:modalPanel. How can I achieve this.

      Thanks for support in advance,
      Fabian zur Heide