variable in one tile to another

2006-04-11 Thread Raghuveer
Is there a facility to get a variable in one tile from another tile in
Struts Tiles


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: variable in one tile to another

2006-04-11 Thread Greg Reddin


On Apr 11, 2006, at 1:43 AM, Raghuveer wrote:


Is there a facility to get a variable in one tile from another tile in
Struts Tiles


Sorry, I'm strapped for time, but I'll try to answer.

If you mean an attribute that is part of a Tiles definition then the  
only ways I know of are to make one tile inherit from another or to  
use a Tiles controller to pull the variable out of context.  If  
you're just talking about a variable in the JSP page, you can put it  
in page context or request scope in one tile and pull it in the other  
tile.  I'd consider this a pretty dangerous practice though.  It  
makes your app very fragile.  Simple changes such as the  
rearrangement of the page could potentially break the app.


HTH,
Greg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: variable in one tile to another

2006-04-11 Thread Raghuveer

Example:
a) I have variable as below in layot.jsp.
String strTemp=NEW;
how can i make this variable available in header,body and footer.
I was advised not to use requeset.setAttribute...
b ) I have some variables available in header.jsp by some jsp include
directive for plumtree application.
How can i make this variables available in body,footer.

At present ,I have included the directive in header,body,footer



-Original Message-
From: Greg Reddin [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 11, 2006 7:40 PM
To: Struts Users Mailing List
Subject: Re: variable in one tile to another



On Apr 11, 2006, at 1:43 AM, Raghuveer wrote:

 Is there a facility to get a variable in one tile from another tile in
 Struts Tiles

Sorry, I'm strapped for time, but I'll try to answer.

If you mean an attribute that is part of a Tiles definition then the
only ways I know of are to make one tile inherit from another or to
use a Tiles controller to pull the variable out of context.  If
you're just talking about a variable in the JSP page, you can put it
in page context or request scope in one tile and pull it in the other
tile.  I'd consider this a pretty dangerous practice though.  It
makes your app very fragile.  Simple changes such as the
rearrangement of the page could potentially break the app.

HTH,
Greg


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]