Nesting Tiles definitions

"Paul Caruana" <[email protected]>
Newsgroups gmane.comp.jakarta.struts.user,gmane.comp.java.mvc.devel
Message-ID <OFA61A8581.8075C6F1-ONCA256CBC.0018CFEE-CA256CBC.001A86FC@zurich.com>
I would like to nest tiles, but have found that doing this in-line does not
work. Please see example below and work around as follows:

Is there a better way to achieve the following?

HTML Generated
==============

<table>
<tr>
      <td>Outer</td>
</tr>
      <td>Inner</td>
      <td>...Content</td>
</tr>
</table>


JSP In-line
===========
<tiles:insert page="panel.jsp">
      <tiles:put name="panelTitle" value="Outer" />
      <tiles:put name="content" direct="true">
            <tiles:insert page="panel.jsp">
                  <tiles:put name="panelTitle" value="Inner Title" />
                        ..Content
                  </tiles:put>
            </tiles:insert>
      </tiles:put>
</tiles:insert>

panel.jsp
=========
<table>
<tr>
      <td><tiles:getAsString name="panelTitle"/></td>
</tr>
<tr>
      <td>
            <tiles:insert attribute="content"/>
      </td>
</tr>
</table>

Work around
===========
<tiles:definition id="inner" page="panel.jsp">
      <tiles:put name="panelTitle" value="Inner" />
      <tiles:put name="content" direct="true">
            ...content
      </tiles:put>
</tiles:definition>

<tiles:insert page="panel.jsp">
      <tiles:put name="panelTitle" value="Outer" />
      <tiles:put name="content" beanName="Inner"/>
</tiles:insert>

--
To unsubscribe, e-mail:   <mailto:[email protected]>
For additional commands, e-mail: <mailto:[email protected]>
Disclaimer.txt (text/plain, 589 B)
------------------------------------------------------------------------This email is intended for the named recipient only. The informationcontained in this message may be confidential, or commerciallysensitive. If you are not the intended recipient you must not reproduceor distribute any part of the email, disclose its contents to any otherparty, or take any action in reliance on it. If you have received thisemail in error, please contact the sender immediately.  Please deletethis message from your computer.------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.