struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Petrelli <brenmcgu...@tariffenet.it>
Subject [Tiles] Inline definitions (WAS: [Tiles] Embedding tiles inside of tiles)
Date Thu, 08 Jun 2006 16:06:33 GMT
Greg Reddin ha scritto:
> As long as your layout is completely defined in one JSP page this will 
> all work.  It breaks down if your layout has separate pages for 
> header, footer, etc.  See below:
>
> <definition name="tileA" path="/layout.jsp">
>   <put name="header" value="/header1.jsp"/>
>   <put name="headerGraphic" value="image1.gif"/>
>   <put name="someOtherThing" value="..."/>
> </definitioin>
>
> <definition name="tileB" extends="tileA">
>   <put name="header" value="header2.jsp"/>
>   <put name="headerGraphic" value="image2.gif"/>
> </definition>
>
> Above you want to define your header differently for two layouts and 
> you want to pass different images in.  This won't work because the 
> headerGraphic attribute will not be passed along to the header page 
> unless you do it manually from the page where it is inserted.

Uh, this makes me think about a possibility to support something like 
"inline definitions" such as:


<definition name="tileB" extends="tileA">
  <put name="header">
    <definition path="/header2.jsp">
       <put name="headerGraphic" value="image2.gif" />
    </definition>
  </put>
  <put name="headerGraphic" value="image2.gif"/>
</definition>

Do you think it could be a good solution?
Ciao
Antonio

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


Mime
View raw message