There are several ways to pass data between pages in T5. They're all demonstrated here:

        
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/state/passingdatabetweenpages1

The one you want is labelled "Request Parameters".  Does that help?

Geoff

On 02/05/2009, at 6:15 PM, Andrew Court wrote:


In order to do what you ask I believe you have to manually pull the
querystring parameters out of the request:

mysearch/results?country=US&state=NY

@Inject
private RequestGlobals requestGlobals;

void onActivate()
{
         Request req = requestGlobals.getRequest();
        String country = req.getParameter("country");
        String state = req.getParameter("state");
}



Angelo Chen wrote:

Hi,

the problem is, when it is this which is very common in the query string,
T5 will not accept:

mysearch/results/country=US&state=NY




ஸ்ரீராம் கீர்த்தி wrote:

Angelo,

you can make it like this...
Object onSuccessFromMySearchForm() {
return "mysearch/results/12345"; // note the '/' 12345 is not a
part
of the query string but part of the url path itself
}

and in Results.java use onActivation method ... something like ...

@Property
private String resultValue;

void onActivate( String resultValue) // or you can use int or long.
Tapestry
will take care ;-)
{
this.resultValue= resultValue; // member field 'resultValue' will now
contain 12345
}

I am not sure if you needed such a way to solve your problem, but this
way
will work for the example you have given.

- keerthy

On Fri, May 1, 2009 at 6:46 PM, Angelo Chen
<angelochen...@yahoo.com.hk>wrote:


Hi,

following code redirects to a results page under mysearch:

Object onSuccessFromMySearchForm() {
      return "mysearch/results";
}

now I need to append a query string after the page name:

return "mysearch/results?12345";

this will trigger an exception:

Unable to resolve 'mysearch/results?12345' to a known page name.

question: how to append a query string to a page name? Thanks,

Angelo


--
View this message in context:
http://www.nabble.com/t5%3A-appending-a-query-string-to-a-page-name--tp23332958p23332958.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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







--
View this message in context: 
http://www.nabble.com/t5%3A-appending-a-query-string-to-a-page-name--tp23332958p23344050.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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



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

Reply via email to