struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonio Petrelli" <antonio.petre...@gmail.com>
Subject Re: Old skool hopefully simple question - Tiles1 and nesting??
Date Wed, 09 Jan 2008 07:48:37 GMT
2008/1/8, Rick Reumann <rick.reumann@gmail.com>:
> <definition name="main.layout" path="/mainLayout.jsp">
> </definition>
>
> <definition name="dashboard.layout" extends="main.layout">
>     <put name="content" value="/dashboardLayout.jsp"/>
> </definition>
>
> <definition name="tasks.page" extends="dashboard.layout">
>     <put name="page_title" value="Tasks" type="string"/>
>     <put name="dashboardContent" value="/WEB-INF/jsp/tasks.jsp"/>
> </definition>


You are trying to fill the "dashboardContent" attribute of
"tasks.page" definition, that uses the "mainLayout.jsp" page as a
template, that has no "dashboardContent" attribute, so it is "obvious"
that it does not show up. Tiles 1 (and Tiles 2) do not support
pass-through attributes! (I am trying to support them in Tiles 2 but
this is another story)

So the solution is to create a definition that fills the
"dashboardContent" attribute of "dashboardLayout.jsp" template, and
then it will be included in the "tasks.page" definition.
IOW:

<definition name="inner.page" template="dashboardLayout.jsp">
  <put name="dashboardContent" value="/WEB-INF/jsp/tasks.jsp"/>
</definition>

<definition name="tasks.page" extends="dashboard.layout">
    <put name="page_title" value="Tasks" type="string"/>
    <put name="dashboardContent" value="inner.page"/>
</definition>

HTH
Antonio

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


Mime
View raw message