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>




------------------------------------------------------------------------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.------------------------------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to