You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Angelo Chen <an...@yahoo.com.hk> on 2009/06/10 16:21:29 UTC
t5: passing query string when redirect
Hi,
In index page my app will do a return MyPage.class, so browser address bar
shows localhost/mypage instead of localhost, now I'd like to pass any query
string from the url to the new page, it should look like this:
if user type : http://localhost/?test=123
then after redirect, browser's address bar should show:
http://localhost/mypage/?test=123
is this possible?
--
View this message in context: http://www.nabble.com/t5%3A-passing-query-string-when-redirect-tp23963374p23963374.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: t5: passing query string when redirect
Posted by Angelo Chen <an...@yahoo.com.hk>.
Hi,
Thanks for the quick reply and I think your first answer should work, reason
for using query string is, it is from Google, it passes ?glid=test something
to the site.
Thiago H. de Paula Figueiredo wrote:
>
> On Wed, Jun 10, 2009 at 11:21 AM, Angelo Chen<an...@yahoo.com.hk>
> wrote:
> Couldn't you use activation context instead of query parameters? If
> so, just @InjectPage a MyPage instance, set the needed info and return
> it. Make sure your MyPage class has a onPassivate() method.
>
> --
> Thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/t5%3A-passing-query-string-when-redirect-tp23963374p23963685.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: t5: passing query string when redirect
Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Wed, Jun 10, 2009 at 11:21 AM, Angelo Chen<an...@yahoo.com.hk> wrote:
> Hi,
>
> In index page my app will do a return MyPage.class, so browser address bar
> shows localhost/mypage instead of localhost, now I'd like to pass any query
> string from the url to the new page, it should look like this:
>
> if user type : http://localhost/?test=123
> then after redirect, browser's address bar should show:
> http://localhost/mypage/?test=123
Couldn't you use activation context instead of query parameters? If
so, just @InjectPage a MyPage instance, set the needed info and return
it. Make sure your MyPage class has a onPassivate() method.
--
Thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: t5: passing query string when redirect
Posted by Ulrich Stärk <ul...@spielviel.de>.
I'm sorry. links are now (5.1) obtained via PageRenderLinkSource's createPageRenderLink(...)
Ulrich Stärk schrieb:
> You can also return a Link instance (you can obtain one by injecting
> ComponentResources and calling resources.createPageLink(...)) and set
> the parameter with link.addParameter(...) prior to returning it.
>
> Uli
>
> Angelo Chen schrieb:
>> Hi,
>>
>> In index page my app will do a return MyPage.class, so browser address
>> bar
>> shows localhost/mypage instead of localhost, now I'd like to pass any
>> query
>> string from the url to the new page, it should look like this:
>>
>> if user type : http://localhost/?test=123
>> then after redirect, browser's address bar should show:
>> http://localhost/mypage/?test=123
>>
>> is this possible?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: t5: passing query string when redirect
Posted by Ulrich Stärk <ul...@spielviel.de>.
You can also return a Link instance (you can obtain one by injecting ComponentResources and calling
resources.createPageLink(...)) and set the parameter with link.addParameter(...) prior to returning it.
Uli
Angelo Chen schrieb:
> Hi,
>
> In index page my app will do a return MyPage.class, so browser address bar
> shows localhost/mypage instead of localhost, now I'd like to pass any query
> string from the url to the new page, it should look like this:
>
> if user type : http://localhost/?test=123
> then after redirect, browser's address bar should show:
> http://localhost/mypage/?test=123
>
> is this possible?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org