You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by thermus <ms...@gmail.com> on 2009/09/24 02:08:16 UTC

Re: [T5] Handle post from external application


Thiago H. de Paula Figueiredo wrote:
> 
> They're not mutually exclusive. They are just different ways to receive  
> parameters. Which one to use is all about the URLs.
> 
> Suppose the page that will receive the request is named "process":
> 
> www.example.com/process/parameter1/parameter2/parameter3: use onActivate
> www.example.com/process?parameter1=1&parameter2=2: use
> Request.getParameter
> www.example.com/process/parameter1/parameter2?parameter3=3: use both!  
> onActivate to get parameters 1 and 2 and Request.getParameter to get  
> parameter 3.
> 
> 

Thiago, 

I know this thread is old, but I had a related question.  If I submit a form
to a response page, what method can be used in the response page to redirect
to a URL like your "use both!" example?  i.e. How can I append
"?parameter3=3&parameter4=4..." to the end of the context when redirecting
after POST?

The idea is to keep the Tapestry onPassivate URL context for real objects,
but allow optional, unordered parameters to be defined in a GET-style
parameter list.  Is this possible in Tapestry?  Thanks!
-- 
View this message in context: http://www.nabble.com/-T5--Handle-post-from-external-application-tp21008825p25531337.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] Handle post from external application

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Wed, 23 Sep 2009 21:08:16 -0300, thermus <ms...@gmail.com> escreveu:

> Thiago,

Hi!

> I know this thread is old, but I had a related question.  If I submit a  
> form to a response page, what method can be used in the response page to  
> redirect to a URL like your "use both!" example?  i.e. How can I append
> "?parameter3=3&parameter4=4..." to the end of the context when  
> redirecting after POST?

Inject the PageRenderLinkSource and use its  
createPageRenderLinkWithContext() method to generate a Link. In this Link  
object, use its addParameter() method to add the query parameters  
(?parameter3=3&parameter4=4). Then return this Link in some event handler  
method (onSubmit or any other). I have not tested it, though.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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