2 Replies Latest reply on Mar 22, 2010 9:09 AM by abcd1

    rich:tree dynamic selection change

    abcd1

      Hi all,

       

                I want to select a particular node of rich:tree after a backend action. The rich:tree is loaded dynamically from the back end. The tree has provision to rearrange its nodes thru back end.  I want to set the focus(selection)  to the newly changed position of the node. If anyone knows the answer, pls help me.

       

      Thanks in advance....

        • 1. Re: rich:tree dynamic selection change
          harut

          Hi Vijay,

           

          You should add adviseNodeSelected="#{myBean.adviseNodeSelected}" attribute to your rich:tree, and define corresponding method in the Bean class --

           

               /**
               * Return true if current node
               * must be selected in the tree.
               *
               * @param tree :UItree
               * @return boolean
               */
              public boolean adviseNodeSelected(UITree tree) {

                 tree.getRowData();  // write business logic identifying if current node is the needed selected one, and return corresponding boolean....
                 ........................................
              }

          • 2. Re: rich:tree dynamic selection change
            abcd1

            Thanks Harut

             

            it really helps..