3 Replies Latest reply on Jun 22, 2006 1:43 PM by Jack Chen

    SEAM context questions

    Jack Chen Newbie

      To me, the extra contexts provided by seam are very useful for web application development, especially the conversation context. but I have some questions on the session context.

      similar to the message list example provided by Seam, I have a paged and sortable list page. I use a session-scoped stateful bean , but the message list can be big and can use a lot of memory.

      1. what's the best way to do this?
      2. If i have to use session-scoped stateful seam component, since Seam hide the details (request, response, session etc) how can i remoe it from the session?


        • 1. Re: SEAM context questions
          Hans Zieg Newbie

          Its better to use the conversation-context, because then you can exactly control how long the state exists and you don´t have to remove it manually from the context. If you have a long message-list with a lot of data the session context is not appropriate. The session-context should be used only for data needed for the whole session, like user date for example.

          Anyhow, you can access the session-context with:


          import org.jboss.seam.contexts.Contexts;


          • 2. Re: SEAM context questions
            Jack Chen Newbie

            thanks for the help. I know a long message list with a lot of data is not good for the session context. but the conversational context is not appropriate either. because for the list page, use can do a lot of things, like sorting, paging, and there is really no clear place to end the conversation.

            • 3. Re: SEAM context questions
              Jack Chen Newbie

              i think that's also why the message list example provided in the Seam download uses session component.