-
1. Re: Event scope not behaving as expected
gav_on_rails Feb 22, 2008 12:59 PM (in response to gav_on_rails)Please ignore the
@public
typo... -
2. Re: Event scope not behaving as expected
msystems Feb 22, 2008 1:10 PM (in response to gav_on_rails)
As I understand it a scope type of EVENT should last until the render response phase.Yes, if you are not using redirects. A redirect triggers a new request (event).
-
3. Re: Event scope not behaving as expected
gav_on_rails Feb 22, 2008 3:36 PM (in response to gav_on_rails)Thanks for this swift response. That makes sense in as much as I was using a redirect to return to this form. I know this happens automatically if you are returning to the same page, this was just a simulation of navigating to another page. I am a little confused now, however. The definition in JavaDocs for ScopeType.EVENT is
The event (request) context. Spans a server request, from restore view to render response.so by this definition a redirect constitutes a new server request. In the case where I do want to redirect to a new page, but also want to make some outjected beans available to the new view, could you tell me which seam context I should use to do this. The first scope that seems to do what I'm after is the session scope, but this is a wider scope than I require for this case. Is there some other mechanism that can be used to handle this case?
-
4. Re: Event scope not behaving as expected
msystems Feb 22, 2008 3:57 PM (in response to gav_on_rails)Use a conversation (temp. or long-running - depends on your use-case/requirements) scope - stateful session beans and entities are default conversation scoped.
-
5. Re: Event scope not behaving as expected
gav_on_rails Feb 22, 2008 4:08 PM (in response to gav_on_rails)Specifying a render in the navigation rule (with the component in the EVENT context) rather than a redirect seems to be sufficient for the simple case of navigating from page A to page B e.g.
<page view-id="/listMenu.xhtml"> <navigation from-action="#{listMenuAction.processAction}"> <render view-id="/listMenu.xhtml"></render> </navigation> </page>
rather than
<page view-id="/listMenu.xhtml"> <navigation from-action="#{listMenuAction.processAction}"> <redirect view-id="/listMenu.xhtml"></render> </navigation> </page>
-
6. Re: Event scope not behaving as expected
msystems Feb 22, 2008 4:21 PM (in response to gav_on_rails)Correctly. No new request (event) is created if you're using a 'render' - again it all depends of your use-case/requirements if you want to use a 'render' or a 'redirect'.