You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rodolfo García Esteban/CYII <rg...@cyii.es> on 2005/11/02 13:51:48 UTC

Tiles, pass parameters between tiles's frames

Hi,

I have a problem with tiles, I have four tile`s frames: a head, a menu, a 
content and a foot. I load all the frames from a JSP which is generic I 
need to pass parameters from the content frame to the menu frame, I have 
tried some alternatives without success. I would appreciatte any help.

Thanks
________________________
Rodolfo García Esteban
Canal Isabel II
División de Aplicaciones Técnicas
C/ Santa Engracia, 125
Edificio 8
Tel. 91 545 10 00 - Ext. 2128
Fax. 91 545 14 41
_______________________

Re: Tiles, pass parameters between tiles's frames

Posted by Greg Reddin <gr...@apache.org>.
On Nov 2, 2005, at 8:45 AM, Ronald Holshausen wrote:
> It would probably be best to use the session as the medium for passing
> between your tile components.

Request would work just as good as session, but either way my  
previous caveat still applies.  If you set something in one tile,  
then retrieve it in another you are dependent on the order in which  
they are invoked.  If you change your layout and shuffle them around  
it won't work anymore.  This is unless, of course, you actually  
invoke one tile from within another (using <tiles:insert>).

Greg


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Tiles, pass parameters between tiles's frames

Posted by Ronald Holshausen <ug...@gmail.com>.
Hi Rodolfo,

It would probably be best to use the session as the medium for passing
between your tile components.

On 02/11/05, Rodolfo García Esteban/CYII <rg...@cyii.es> wrote:
> Hi,
>
> I have a problem with tiles, I have four tile`s frames: a head, a menu, a
> content and a foot. I load all the frames from a JSP which is generic I
> need to pass parameters from the content frame to the menu frame, I have
> tried some alternatives without success. I would appreciatte any help.
>
> Thanks
> ________________________
> Rodolfo García Esteban
> Canal Isabel II
> División de Aplicaciones Técnicas
> C/ Santa Engracia, 125
> Edificio 8
> Tel. 91 545 10 00 - Ext. 2128
> Fax. 91 545 14 41
> _______________________
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Tiles, pass parameters between tiles's frames

Posted by Greg Reddin <gr...@apache.org>.
On Nov 2, 2005, at 6:51 AM, Rodolfo García Esteban/CYII wrote:
> I have a problem with tiles, I have four tile`s frames: a head, a  
> menu, a
> content and a foot. I load all the frames from a JSP which is  
> generic I
> need to pass parameters from the content frame to the menu frame, I  
> have
> tried some alternatives without success. I would appreciatte any help.

What are some of the alternatives you've tried?  Are the parameters  
you are passing part of the Tile definition or stored somewhere  else?

One caveat:  You should never rely on the order of Tiles being  
processed in a template.  For example suppose you have a menu tile  
and a content tile.  If you add a request attribute in the content  
tile, hoping it will be available in the menu tile, it won't work if  
the menu tile has already been processed.  But you can set something  
in the request before the template is invoked (i.e. in your Action if  
you're using Struts).

Greg


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org