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

    SEAM context questions

    jack70_chen

      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?


      thanks
      Jack

        • 1. Re: SEAM context questions
          bambata

          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:

          Contexts.getSessionContext().remove(...);

          import org.jboss.seam.contexts.Contexts;


          hans

          • 2. Re: SEAM context questions
            jack70_chen

            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
              jack70_chen

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