-
1. Re: Is there really NO WAY to make a CLEAN redirect with Seam?
christian.bauer Jul 30, 2008 6:19 PM (in response to mirco)ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext(); try { ctx.redirect(ctx.encodeResourceURL(url)); } catch (IOException ioe) { throw new RedirectException(ioe); } FacesContext.getCurrentInstance().responseComplete();
This is plain JSF, nothing required in Seam.
-
2. Re: Is there really NO WAY to make a CLEAN redirect with Seam?
christian.bauer Jul 30, 2008 6:21 PM (in response to mirco)Of course you can also do this in Seam 2.1 in pages.xml:
<navigation> <rule if-outcome="myActionOutcome"> <redirect url="http://whatever"/>
-
3. Re: Is there really NO WAY to make a CLEAN redirect with Seam?
mirco Jul 30, 2008 7:31 PM (in response to mirco)Danke Christian :-) for your fast response. Unfortunatelly, your solution is not working.
Your first solution redirects to
/somedirectory/?cid=XXX
Your second solution might work but is not useful for me, because my application generates URL from the database. pages.xml won't help.
I am afraid, after many troubles with seam, the life is easier without it. On some places it helps, but it adds alot of troubles elsewhere. Unfortunatelly, most of the nice features ends when users open another tab in their session, or use back button. Even the demo application that used to work at http://seam.demo.jboss.com /not working for weeks now/ fails if you use back button on search output.
Thank you so much for trying to help me with my pain :-)
-
4. Re: Is there really NO WAY to make a CLEAN redirect with Seam?
christian.bauer Jul 30, 2008 11:37 PM (in response to mirco)
Miroslav Liska wrote on Jul 30, 2008 19:31:
Your first solution redirects to/somedirectory/?cid=XXX
I took this code from the application you are looking at. It does not append a conversation id there.
Your second solution might work but is not useful for me, because my application generates URL from the database. pages.xml won't help.Why not? The value of the url attribute can be an EL expression.
-
5. Re: Is there really NO WAY to make a CLEAN redirect with Seam?
mirco Jul 31, 2008 3:15 PM (in response to mirco)
I took this code from the application you are looking at. It does not append a conversation id there.Are there any conversation-related settings on this application? Because..... I keep getting
/somedirectory/?cid=XXX
with your code inserted into my application. Or is there another way to bypass seam related filters when redirecting?