-
1. Re: Redirect and GET parameters
damianharvey Dec 12, 2007 4:27 AM (in response to amorfis)Have a read of the documentation around page parameters eg. in your page.xml
Cheers,
Damian. -
2. Re: Redirect and GET parameters
amorfis Dec 12, 2007 5:07 AM (in response to amorfis)I read the documentation. I have something like
<page view-id="/article.jsp"> <param name="articleId" value="#{articleId}"/> </page>
in my pages.xml.
Is this what you meant? If not, please give me some more hints.
Best regards
Pawel Stawicki -
-
4. Re: Redirect and GET parameters
alllle Dec 18, 2007 6:37 PM (in response to amorfis)I have the same question.
The page param works fine with current window but it's not bookmarkable. In other words, user won't be able to locate this page 2 days later using
http://localhost:8080/app/article.xhtml?conversationId=2
The conversationId will be long gone by that time. The parameter needs to show up explicitly in the URL, something like:
http://localhost:8080/app/article.xhtml?conversationId=2&articleId=3
And is there a way to remove the "conversationId=2" part? (mine is "cid=xxx"). I suspect it's going to cause problem when user try to access the page with an expired conversation. -
5. Re: Redirect and GET parameters
pmuir Dec 19, 2007 6:20 AM (in response to amorfis)The page param should allow you to do this.
And is there a way to remove the "conversationId=2" part? (mine is "cid=xxx"). I suspect it's going to cause problem when user try to access the page with an expired conversation.
No, Seam was specifically designed not to have this problem. -
6. Re: Redirect and GET parameters
alllle Dec 19, 2007 4:11 PM (in response to amorfis)"pete.muir@jboss.org" wrote:
The page param should allow you to do this.
Could you elaborate it a little bit more? As described in the previous posts in this thread, the default behavior does not append "articleId=xx" to the URL redirected. what do I need to change to have the "articleId=xx" parameter show up in the URL?
Thanks, -
7. Re: Redirect and GET parameters
skanky78 Dec 19, 2007 4:45 PM (in response to amorfis)hi,
try the following in your pages.xml<page view-id="/home.jsp"> <navigation> <rule if-outcome="viewArticle"> <redirect view-id="/article.jsp" > <param name="articleId" value="#{param.articleId}" /> </redirect> </rule> </navigation> </page>
cheers,
sven -
8. Re: Redirect and GET parameters
alllle Jan 22, 2008 12:05 PM (in response to amorfis)"skanky78" wrote:
hi,
try the following in your pages.xml<page view-id="/home.jsp"> <navigation> <rule if-outcome="viewArticle"> <redirect view-id="/article.jsp" > <param name="articleId" value="#{param.articleId}" /> </redirect> </rule> </navigation> </page>
Just want to close the loop: yep, this worked! Thanks!
cheers,
sven