1 Reply Latest reply on Jul 22, 2009 8:39 PM by Juan Martin Chiaradia

    rich tree node selection value

    Thiagu Mariappan Novice

      hi every one
      i am using rich tree component in my page.
      i wants this component works like single selection menu.
      i meant, i want to display the tree node label value is in readable format.
      while select particular node i wants to pass the different value to my Node Selected action listener.
      is it possible..


        • 1. Re: rich tree node selection value
          Juan Martin Chiaradia Newbie

          Hello thiagu,

          This is the way that I do that:

          <rich:tree id="tree" switchType="ajax" >
               <rich:treeNodesAdaptor nodes="#{treeBean.nodes}" var="_node">
                    <rich:treeNode id="dode"                                     
                              <h:outputText value="#{_node.name}" />

          Here is the nodeSelectedListener method in the treeBean:

          public void nodeSelected(NodeSelectedEvent event){
               NodeClass selectedNote = (NodeClass)((HtmlTreeNode) event.getComponent()).getUITree().getRowData();
                  work with selectedNode;

          I hope this help you,