struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Stair" <>
Subject RE: [TILES] Passing attributes to tiles
Date Wed, 26 Mar 2003 17:18:42 GMT
What I was told was that if you think about the layout file as a method
being called
from the tiles definition, you are sort of calling a sub-method when
you try to get to
another file from inside the layout file, and when you call another
method, if you
want that method to be able to access a variable that is available in
the top level
method, you have to explicitly pass that variable to that sub-method.

With your definition of:

<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"/>

Then, inside "tile-1.jsp", where you have 

        <tiles:get name="nav"/>

instead, put this:

        <tiles:insert name="nav">
            <tiles:put name="hideButton" beanName="hideButton"
beanScope="tile" />

Steve Stair

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

View raw message