0 Replies Latest reply on Jul 19, 2011 6:40 AM by bcn

    how to collapse tree nodes on client side

    bcn

      I would like to collapse all other nodes when a node is expanded. My toggle type is client, so I would like a pure client / javascript solution.

      Shouldn't the following work?

       

      <rich:treeNode expanded="true"  onbeforetoggle="this.collapse();">

       

      But I get a

      this.collapse is not a function

      error, although collapse() is defined in tree.js.

       

      onbeforetoggle="$('.rf-trn').collapse();"

      doesn't work neither.

       

      Thanks