struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sri Sankaran" <>
Subject RE: [TILES] Passing attributes to tiles
Date Tue, 25 Mar 2003 18:53:09 GMT
Answering my own question.

In tile-1.jsp when I define an attribute (<tiles:useAttribute) with request scope, I can
reference it any of the contained tiles just like any other Java bean.


-----Original Message-----
From: Sri Sankaran [] 
Sent: Tuesday, March 25, 2003 1:12 PM
To: Struts Users Mailing List
Subject: [TILES] Passing attributes to tiles

Using Struts 1.1b3

Consider a simple page layout comprised of two tiles, a body and a (wizard-like) navigation
bar.  I would like to conditionally disable certain navigational buttons on some pages.  I
am trying to use the <tiles:put> and <tiles:useAttribute> to no avail.

Here's a sample tile definition

<definition name="tile.1" path="tile-1.jsp">
  <put name="hideButton" value="yes"/>
  <put name="body" value="tile-1-body.jsp"/>
  <put name="nav" value="tile-1-nav.jsp"/>

I find that I can access "hideButton" in tile-1.jsp but not in tile-1-nav.jsp.  

In other words, the following works in tile-1.jsp


Hide value is <%=hide%>

But not in any of tile-1-body.jsp or tile-1-nav.jsp.

Is this expected behavior?  Do you have any suggestions on how I can achieve what I am trying?
 The one workaround I have is to use a <bean:define> in tile-1.jsp and reference that
bean in tile-1-nav.jsp.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message