2 Replies Latest reply on Aug 24, 2007 4:57 AM by Tomislav Tkal?evi?

    tree, autosave state?

    Yevgen Tester Newbie


      is it possible that all opened tree nodes to save, and than if i open this page later the tree openes all opened nodes?
      So automatic restore state?

        • 1. Re: tree, autosave state?
          Tomislav Tkal?evi? Novice

          This is the way I have done it:
          On jsp page:

          <r:tree switchType="ajax" binding="#{tree}"
          var="item" nodeFace="#{item.type}">

          In the upper code "binding="#{tree}"" is important.

          And in your bean:
          public class RichKatalog implements RichKatalogInterface {
           private static final long serialVersionUID = -259241232787790718L;
           private UITree tree;

          So you just value binded you tree in the Conversation bean,what means that your tree will save state.
          Best regards!

          • 2. Re: tree, autosave state?
            Tomislav Tkal?evi? Novice

            this is also usefull.You can add this methods in your bean too:

             public void expandAll() {
             try {
             } catch (IOException e) {
             public void collapseAll() {
             try {
             } catch (IOException e) {

            Tree is outjected and injected so this will work too.