You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Damien de Saint Laurent <da...@yahoo.fr> on 2010/11/09 10:24:01 UTC

calliing a tapestry component from a JSP

Hi,

Is there a simple way for including a tapestry(5) component into a JSP view
with setting request attributes from the JSP and accessing these attributes in the tapestry component via request.getAttribute ?

Since, "in Tapestry, there is usually two requests per operation: the action request that redirects to a render request" ,  I wander if attributes stored in request are lost in between .

Best regards,

Damien


      

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


Re: calliing a tapestry component from a JSP

Posted by Richard Hill <ri...@su3analytics.com>.
A POST will trigger a redirect (Tapestry employs the redirect-after-post
pattern)

An actionlink will also trigger a redirect. However a pagelink will not,
this is a straightforward GET request.

For redirects yes state is lost. If you are redirecting to the same page
you can @Persist fields to store any state (values for @Persist'd fields
are stored in the session and are scoped to the one page). If you are
redirecting to another page you can store state globally in the session
via ApplicationStateManager

R.


-----Original Message-----
From: Damien de Saint Laurent <da...@yahoo.fr>
Reply-to: "Tapestry users" <us...@tapestry.apache.org>
To: users@tapestry.apache.org
Subject: calliing a tapestry component from a JSP
Date: Tue, 9 Nov 2010 09:24:01 +0000 (GMT)

Hi,

Is there a simple way for including a tapestry(5) component into a JSP view
with setting request attributes from the JSP and accessing these attributes in the tapestry component via request.getAttribute ?

Since, "in Tapestry, there is usually two requests per operation: the action request that redirects to a render request" ,  I wander if attributes stored in request are lost in between .

Best regards,

Damien


      

---------------------------------------------------------------------
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: calliing a tapestry component from a JSP

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 09 Nov 2010 07:24:01 -0200, Damien de Saint Laurent  
<da...@yahoo.fr> wrote:

> Hi,

Hi!

> Is there a simple way for including a tapestry(5) component into a JSP  
> view

I don't think so.

> Since, "in Tapestry, there is usually two requests per operation: the  
> action request that redirects to a render request" ,  I wander if  
> attributes stored in request are lost in between .

They are, but remember that an action (event) request only happens when  
submitting a form or handling an event. Simply requesting a page is done  
without redirects.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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