9 Replies Latest reply on Feb 26, 2009 3:44 PM by reddynec

    tomahawk saveState not working with richfaces 3.1.4 (rf-1519

    mhn

      I am facing a problem with tomahawk t:saveState which seems to be caused by richfaces. The saved component is still "living" after leaving and revisiting a page.

      Pls see also jira issue rf 1519 http://jira.jboss.com/jira/browse/RF-1519

      I defined a managed bean in request scope:
      <managed-bean-name>WorkflowController</managed-bean-name>
      <managed-bean-scope>request</managed-bean-scope>

      It is saved via:
      <t:saveState id="savedWorkflowController" value="#{WorkflowController}"/>

      If I enter the page the first time then the Constructor of WorkflowController is called. If I now leave the page and re-enter it I expect that a new instance is created, but it isn't.

      I am sure that this feature was working well in the past. An older version of my workspace with ajax4js4 1.1.0 is running fine. Unfortunately I can't go back to this version in my current workspace due to incompatibilities.

      My enviroment:
      myFaces 1.1.5
      tomahawk 1.1.5 snapshot
      richfaces 3.1.4 GA
      tiles and jsps (no facelets)
      server-side state saving

      What is the status of rf-1519 ?
      Will this be fixed in 3.1.5?
      Unfortunately I can't update to 3.1.2 because I have to use jsf 1.1

        • 1. Re: tomahawk saveState not working with richfaces 3.1.4 (rf-
          mhn

          Will this be fixed in 3.1.5 or is there a patch available ?

          I see this as very critical because beans are not recreated with new data and stay somewhere in memory. Therefore it is currently a show stopper for my project and I can't go back to a4j 1.1.

          I appreciate any feedback.

          • 2. Re: tomahawk saveState not working with richfaces 3.1.4 (rf-

            Tomawhak inside rich faces is a bad medicine...

            Try to remove any T tags when you use Richfaces.

            (Thats only my private view from very bad expirence)

            • 3. Re: tomahawk saveState not working with richfaces 3.1.4 (rf-
              mhn

              I have more than 150 jsps and can't remove tomahawk nor a4j/richfaces. This is definitely not a solution.

              BTW I use tomahawk with a4j for nearly 20 months now without any critical problems except the above mentioned one, after migration from a4j to richfaces.
              They work well together.

              Therefore I would like that the old behavior would be provided again, since this was working in former versions. Otherwise people could be forced to drop one of the frameworks which can be very time consuming and result in large efforts.

              could anybody from the dev team please comment this issue?

              • 4. Re: tomahawk saveState not working with richfaces 3.1.4 (rf-
                moldovan

                Just a suggestion:

                Have you tried <a4j:keepAlive> - Tag? It should work in ajax- and server-mode!
                so maybe, this should fit your needs!

                I don't know how you are sending your requests (ajax or server), but it's not a good solution, and maybe not working, if you are using t:saveState in comibation with ajax.

                • 5. Re: tomahawk saveState not working with richfaces 3.1.4 (rf-
                  mhn

                  I use a4j:keepAlive in some ajaxrequests for wizards etc. Not sure whether it works for non ajax requests.
                  I'll try this.

                  • 6. Re: tomahawk saveState not working with richfaces 3.1.4 (rf-
                    mhn

                    Someone in the myfaces users list told me he had the same problem with
                    MyFaces 1.2.2,
                    Tomahawk 1.1.6
                    RichFaces 3.1.2 SP1

                    He switched to RichFaces 3.1.4 GA and now it works fine.

                    I use MyFaces 1.1.5 and RichFaces 3.1.4 and have this problem. MyFaces 1.1.5 works well with a4j 1.1.

                    So there is an incompatibility between myFaces 1.1.5 and richfacs 3.1.4

                    • 7. Re: tomahawk saveState not working with richfaces 3.1.4 (rf-
                      mhn

                      I tried

                      <a4j:keepAlive beanName="WorkflowController"/>
                      instead of
                      <t:saveState id="savedWorkflowController" value="#{WorkflowController}"/>
                      
                      
                      KeepAlive is also not working as expected.
                      I am facing the same problem as with t:savestate.
                      
                      If I enter the page the first time then the Constructor of WorkflowController is called. If I now leave the page and re-enter it I expect that a new instance is created, but it isn't.
                      
                      There seems to be something serious wrong with state saving/handling


                      • 8. Re: tomahawk saveState not working with richfaces 3.1.4 (rf-
                        mhn

                        sorry for last post, a tag was not closed.

                        I tried

                        <a4j:keepAlive beanName="WorkflowController"/>

                        instead of
                        <t:saveState id="savedWorkflowController" value="#{WorkflowController}"/>


                        KeepAlive is also not working as expected.
                        I am facing the same problem as with t:savestate.


                        If I enter the page the first time then the Constructor of WorkflowController is called. If I now leave the page and re-enter it I expect that a new instance is created, but it isn't.

                        There seems to be something serious wrong with state saving/handling!
                        I ensured that the bean has request scope.
                        It is reinstatiated on each request if I don't use keepAlive or saveState.


                        • 9. Re: tomahawk saveState not working with richfaces 3.1.4 (rf-

                          Hi i am also facing the same problem with the t:savestate even i couldn't get the page reload the data from database after saving the edited record.

                          When i revisit the page its still alive....


                          ANY help on this would be great

                          My environment
                          Richfaces-3.1.5 GA
                          tomahawk 1.1.6
                          myfaces 1.1.5