2 Replies Latest reply on Jul 10, 2009 6:19 PM by asookazian

    Stateful form

    katsu

      hi all,


      i have extremely basic problem in Seam. here's the description.


      i trying to modify the insert form which generated from Seam-gen, at the insert form for precision. each time the user clicking OK button, the action listener keep the user remain in the insert form, so he/she doesn't go any where. hence he can insert data quickly without interrupted by view form. the insertion process can be repeated without reloading the page.


      juggling with some trial error on rewriting the code, i get the solution by changing the component to be Stateful and scoped in Session. any other combination than both annotation, do not work.



      @Stateful
      @Scope(SESSION)



      my question is, why it do in that way? do we can declare a stateful component in explicit conversation? sorry for poor English.


      any answer will be appreciated

        • 1. Re: Stateful form
          katsu

          i'm sorry,


          my speculation above is proved not valid. i revised to the following:


          action controller can't insert into database in case when the form page were redirected from login form.


          in case when insert form is reloaded, it can do as expected and don't depend on whether action listener is Stateless or Stateful, or any other annotation criteria.


          sorry for bugging you,any further explanation will be valuable.


          thanks

          • 2. Re: Stateful form
            asookazian

            I don't completely understand your question/problem, but a SFSB can be of scope CONVERSATION or SESSION.  That should not affect the transactional semantics of your component.


            You may get a better answer if you show the code...