3 Replies Latest reply on Mar 14, 2008 12:41 AM by brachie

    Explanation of ScopeType.PAGE needed

    brachie

      Hi,


      I our Seam app, we are very often outjecting EntityBeans the user works with in the PAGE scope.


      Could anybody give me a detailed explanation where this data is stored? I read that the data is serialized to the page.. what does this mean in detail?


      Is the page scoped data shared between all users currently viewing this page or has every user his own instance of the page? If so, why is the PAGE scope called stateless?


      Suppose, the user stays on the same page when working with page scoped data (only page parts are refreshed with ajax), is it ok to put the data in ScopeType.PAGE in this case?


      Thanks for you help! :-)


      Regards,


      Alexander


        • 1. Re: Explanation of ScopeType.PAGE needed
          christian.bauer

          PAGE scope means a hashmap that is stored in the JSF ViewRoot, it's for a particular page, for a particular user (even bound to request/response cycles), and it's not stateless. Read up on JSF to understand what the view is and where it is stored (state manager in JSF offers choice here).


          • 2. Re: Explanation of ScopeType.PAGE needed
            christian.bauer

            Alexander Seitz wrote on Mar 13, 2008 12:02 AM:

            Suppose, the user stays on the same page when working with page scoped data (only page parts are refreshed with ajax), is it ok to put the data in ScopeType.PAGE in this case?



            Actually, that is the primary purpose of the PAGE context. Assuming that all the requests are POSTbacks on the same JSF view (Ajax requests typically are).

            • 3. Re: Explanation of ScopeType.PAGE needed
              brachie

              @Christian: Thanks for explaining. I will study some JSF docs for further infos :-)


              Alexander