1 Reply Latest reply on Apr 3, 2009 8:21 AM by Ilya Shaikovsky

    rich:tree expand

    Tomislav Tkal?evi? Novice

      Hy to all!
      In constructor of managed bean i fill one tree node which is the root node an value of rich:tree component,

      That's OK, tree fills with data, and hierarchy but when from jsp page
      i try to bind component to the managed bean and after filling the root
      tree node try to call tree.queueExpandAll() method,
      my tree cant be expanded and throws exception.

      So my problem is when i populate the hierarchy to the root node, how to automatically expand that nodes just created??

      Or how to expand nodes that are newly added?

      Managed bean code:

      private class Test{
       private HtmlTree tree;
       private HtmlTreeNode rootNode;
       public Test(){
       private void populate(){
       //code to populate the tree
       public void expand() {
       try {
       } catch (IOException e) {
       // TODO Auto-generated catch block
       public HtmlTree getTree() {
       return tree;
       public void setTree(HtmlTree tree) {
       this.tree = tree;
       public HtmlTreeNode getRootNode() {
       return rootNode;
       public void setRootNode(HtmlTreeNode rootNode) {
       this.rootNode = rootNode;

      Jsp page code:

      <r:tree switchType="ajax" value="#{test.rootNode}" var="v"
       binding="#{test.tree}" ...