1 Reply Latest reply on Nov 18, 2007 2:47 PM by ykravchenko

    rich:tree clear selection

    jmiguel77

      hi

      i am using a rich:tree object to manipulate some data
      I select a node an add the node information to the session. After processing the node information i would like to clean the selected node in the tree

      i have tried to:

      tree.setRowIndex(-1)
      tree.setRowKey(null)

      but without any success

      how can i do this ???

      thanks a lot

        • 1. Re: rich:tree clear selection
          ykravchenko

          jmiguel77 try to use this

          TreeState state = (TreeState) tree.getComponentState();
          state.setSelected(null);


          I'm not sure that this method will clear selection visually, but I can guaranty that next time you click the same node the selectionlistener will be fired again (that's what I needed once)
          Anyway try it maybe it works for you