2 Replies Latest reply on Jul 7, 2009 9:29 AM by Ioana Iacob

    rich:tree node selection problem

    Ioana Iacob Newbie


      I have a rich tree:

      <rich:tree width="300px" value="#{Bean.tree}" var="node"
       toggleOnClick="true" onselected="return false">
       <rich:treeNode ajaxSingle="true">
       <h:outputText value="#{node}"/>

      the listener is:
      public void processTreeNodeImplSelection(final NodeSelectedEvent event) {HtmlTree tree = (HtmlTree) event.getComponent();
       nodeTitle = (String) tree.getRowData();
       TreeNode currentNode = tree.getModelTreeNode(tree.getRowKey());
       if (currentNode.isLeaf()){

      The nodes are loaded dynamcally from the db, which works just fine, the problem is the listener, which is not called when I click on a node (only if I click on the icon), and sometimes gives error ( java.lang.IllegalStateException: No tree element available or row key not set!).

      Richfaces version is 3.3.0, jboss 4.2.3.

      Thank you.