9 Replies Latest reply on Jul 26, 2011 1:12 PM by Ngon Hua

    Expand/Collapse tree node by clicking on treenode text

    nirvanbd Newbie


          I am looking for a solution where I can expand/collapse the tree node by clicking the outputText inside the treeNode. I have the following simple code.



      <rich:treeNode  type="parent" expanded="#{treeMenuBean.nodeExpanded}" >
                  <h:outputText value="#{node.desc}" />


      I am using toggleType="client". With the above treeNode code, the node expands/Collapses only when the tree icon (the '+' image that appears to the left of treeNode) is clicked. Clicking on the <h:outputText> results in no action. I would like to allow the user to click anywhere on the treeNode and expand/collapse the node accordingly.


      Thanks and regards,