You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Tim Koop <ti...@timkoop.com> on 2011/04/27 20:30:50 UTC

Query string

I have some third party code that calls one of my Tapestry pages, 
passing in some values in the query string.  From in my Tapestry page 
(the Java class), how can I retrieve this query string?

Thanks.

-- 
Tim Koop
tim@timkoop.com <ma...@timkoop.com>
www.timkoop.com <http://www.timkoop.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Query string

Posted by Sven Homburg <ho...@googlemail.com>.
@Inject
private Request request;

.... somewhere in the page code ....
String parameter = request.getParameter("parameter-name");



with regards
Sven Homburg
Founder of the Chenille Kit Project
http://chenillekit.codehaus.org





2011/4/27 Tim Koop <ti...@timkoop.com>:
> I have some third party code that calls one of my Tapestry pages, passing in
> some values in the query string.  From in my Tapestry page (the Java class),
> how can I retrieve this query string?
>
> Thanks.
>
> --
> Tim Koop
> tim@timkoop.com <ma...@timkoop.com>
> www.timkoop.com <http://www.timkoop.com>
>
> ---------------------------------------------------------------------
> 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: Query string

Posted by Josh Canfield <jo...@gmail.com>.
@ActivationRequestParameter

It's not easy to find on the docs...

On Wed, Apr 27, 2011 at 11:30 AM, Tim Koop <ti...@timkoop.com> wrote:
> I have some third party code that calls one of my Tapestry pages, passing in
> some values in the query string.  From in my Tapestry page (the Java class),
> how can I retrieve this query string?
>
> Thanks.
>
> --
> Tim Koop
> tim@timkoop.com <ma...@timkoop.com>
> www.timkoop.com <http://www.timkoop.com>
>
> ---------------------------------------------------------------------
> 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: Query string

Posted by Mark <ma...@xeric.net>.
On Wed, Apr 27, 2011 at 2:29 PM, Mark <ma...@xeric.net> wrote:

> On Wed, Apr 27, 2011 at 1:30 PM, Tim Koop <ti...@timkoop.com> wrote:
>
>> I have some third party code that calls one of my Tapestry pages, passing
>> in some values in the query string.  From in my Tapestry page (the Java
>> class), how can I retrieve this query string?
>>
>> Sorry here it is...

Lets say you have something like:

> http://localhost:8080/app/page?value1=testValue&value2=99

>
In the page class write:

>
@ActivationRequestParameter
private String value1

@ActivationRequestParameter
private int value2

If you are using Tapestry Hibernate and the value is the id, you can do
something like:
@ActivationRequestParameter
private MyObject myObject

Mark

Re: Query string

Posted by Mark <ma...@xeric.net>.
On Wed, Apr 27, 2011 at 1:30 PM, Tim Koop <ti...@timkoop.com> wrote:

> I have some third party code that calls one of my Tapestry pages, passing
> in some values in the query string.  From in my Tapestry page (the Java
> class), how can I retrieve this query string?
>
>
Lets say you have something like:
http://localhost:8080/app/page?value1=testValue&value2=99

In the page class write:

@Request