2 Replies Latest reply on Jan 15, 2010 3:22 PM by cilgamir

    Restore Bean state

    cilgamir

      Hi All


      I submit a page, the code in the bean writes to the database and then it redirects me to another page, the new page asks if I want to submit another request.


      If I say yes, it redirects me back to the orignal page.


      The redirection works fine, but I want to restore the page to it's original state for the new request.


      What is the best way of doing this, of restoring the state of the bean so that it's like new


        • 1. Re: Restore Bean state
          idyoshin

          you should restart conversation on redirecting to the view. i.e. when user goes to the yes-no-page the conversation is ended via <end-conversation /> or @End annotation over method.



          and in your main page (where you enter data) - start conversation.



          Regards,


          Ilya Dyoshin

          • 2. Re: Restore Bean state
            cilgamir

            Hi Ilya


            I'm new to seam, I've got a ton of JSF experience, which makes me feel like I don't have control in seam :)


            I'll do a bit of research on the conversation thing, I'm sure you've pointed me in the right direction
            Thanks


            H