1 Reply Latest reply on Jan 12, 2007 5:07 AM by Pete Muir

    seam context

    James Chua Newbie

      Hi,

      I don't quite understand the seam context, as they are many and the documentation doesn't seem to be enough for a beginner. Could somebody explain this. Is the session context and seam and jsf have the same scope? what is then the equivalent of jsf's request scope in seam? is it page or event? how are they differ from one another?

      In the clickable list example. the message entity has a scope of event? I can't understand why it has a scope? isn't the messengermanagerbean is doing all the work?

      Thanks

        • 1. Re: seam context
          Pete Muir Master

          Session Context in Seam is equivalent (funcctionally at least, maybe not in impl) to Session in JSF. JSF Request scope is the EVENT scope, the PAGE scope lasts from when a page is rendered to when it is navigated away from (i.e. if an instance of a page is refreshed e.g. for validation the you are still in the same PAGE scope but in a different EVENT scope.

          Entities are normally (by default) bound to the conversation context, but you might want them in a different scope for design reasons (e.g. to ensure they are updated at every request) - you can do this either by using the @Scope annotation on the bean or by altering the scope used to outject (on @Factory or @Out).

          I'm not up on the message example so hopefully you can infer answers from the general comments above.