-
1. Re: page action and redirect
buckmin.erdem.agaoglu.gmail.com Apr 25, 2008 3:18 PM (in response to buckmin.erdem.agaoglu.gmail.com)anyone?
-
2. Re: page action and redirect
andygibson.contact.andygibson.net Apr 25, 2008 9:14 PM (in response to buckmin.erdem.agaoglu.gmail.com)The example you gave does indeed cause some weird recursive redirecting, but it appears to be following what you asked it to do.
What is it you are trying to achieve with this pages.xml entry?
Cheers,
Andy Gibson
-
3. Re: page action and redirect
buckmin.erdem.agaoglu.gmail.com Apr 26, 2008 12:12 AM (in response to buckmin.erdem.agaoglu.gmail.com)i am trying to get this page to render as usual on any non-JSF request, and get redirected on JSF requests to avoid refresh issues. But the actions should be called regardless of the request type.
Actually it also seems to me that i ask it to redirect recursively. i debug some more and it goes more or less like
- call action on the page
- because action is returns void/null render same page
- this page requires redirect so redirect
- now another request to the same page, call action again
- ...
This process seems ok if page actions are a way to modify navigation which gets me to the point that confuses me in the first place. Ref tells
The page action method can return a JSF outcome. If the outcome is non-null, Seam will use the defined navigation rules to navigate to a view.I dont have much experience with JSF and/or Seam but IMHO page actions should not be treated as JSF outcomes. I am just thinking loudly, when i got to the render response i should "render response", not evaluate it. Page actions in pages.xml are to be triggered just before rendering the page i have determined at the Invoke Application. And for the non-JSF requests since i dont have any Invoke Application i should just render the page that is requested. I am still thinking loudly another argument to that behaviour is since i can define multiple page actions on a page, which action will determine the simulated JSF outcome and process the navigation as required (one method may return "success" and the other may "failure"). But as i said i might be wrong at all of this.
And in my case page action returns null (or void to be precise) so seam should not use defined navigation rules.
Besides all, how am i supposed to do what i actually try?