6 Replies Latest reply on Feb 26, 2008 11:23 PM by venkat.sadasivam

    rich:tree state

    bobbiee

      Hei, I created dynamic rich:tree. The problem is, that everytime I perform server request, this tree lose his state (every node is collapsed again like on the begining). I would like to ask, if is it possible for this tree to somehow remember his state after server request?

      Thanks in advice.

      Lukas

        • 1. Re: rich:tree state
          bobbiee

          I found out. Its only to assign componentState attribute with value from backing bean, then it works.

          I have another thing to wonder about. My page is divided into 2 parts. First part contains rich:tree, content of the second part depends on which node is clicked from tree. I am thinking about how to render (on click in tree) only this second part (without rendering whole page). Cant use a4j:include, cause I dont want tree to be rerendered.

          Any sugestions?











          • 2. Re: rich:tree state
            venkat.sadasivam

            Hi Lukas,

            I too have same problem in preserving tree state. Should I have to pass tree node id for the attribute componentState?

            Please guide me.

            Thanks,
            Venkat

            • 3. Re: rich:tree state
              bobbiee

              Hi Venkat,

              which switch do you use for your tree??

              • 4. Re: rich:tree state
                venkat.sadasivam

                Hi Lukas,

                I use "client" switch. When a leaf node is selected I reload the whole page.

                thanks,
                Venkat

                • 5. Re: rich:tree state
                  bobbiee

                  So your problem is that when you change view by clicking tree node, you reload whole page? Look inside your faces-config.xml file and delete all navigation rules inside there. This is the cause of the "ajax request cause non-ajax request" and reloads whole page.

                  • 6. Re: rich:tree state
                    venkat.sadasivam

                    I resolved this issue by keeping TreeState in the session scope.