You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Willemsen <rw...@xs4all.nl> on 2003/05/23 14:00:44 UTC

Nesting tiles puts and inserts

Hi All,

I'm a newbie concerning Tiles. I'm just trying something out but I'm
beginning to wonder if this is actually possible. See the example JSP
part.

....
<tiles:insert definition="document">
  <tiles:put name="title" value="Test document" type="string"/>
  <tiles:put name="body" type="string">

    <tiles:insert definition="panel">
      <tiles:put name="title" value="Test Panel" type="string"/>
      <tiles:put name="body" type="string">
        
        <tiles:insert definition="section">
          <tiles:put name="title" value="Test Section" type="string"/>
          <tiles:put name="body" type="string">
            <p>Section content.</p>
          </tiles:put>
        </tiles:insert>
          
      </tiles:put>
    </tiles:insert>
      
  </tiles:put>
</tiles:insert>
....

As you'll probably notice, I'm trying to nest a section in a panel and
that panel in a document again. FYI, the section and panels should
more-or-less produce a table in a table. The document is straight
forward html/head/body tag stuff.

The result of this is that the section is NOT included in the panel and
the panel is NOT included in the document. The section is 'printed'
before the panel and the panel is 'printed' before the document. As in:

Expected:
  <document>
    <panel>
      <section>
        content
      </section>
    </panel>
   </document>

Actual result:
  <section>
    content>
  </section>
  <panel>
  </panel>
  <document>
  </document>

I'm pretty sure this is due of printing directly to the same JspWriter
(am I right?). I'm actually wondering if such nesting is even possible.

Any tips or hints would be greatly appreciated.

Kind regards,
Richard

-- 
Richard Willemsen
mailto:rwillems@xs4all.nl
http://www.xs4all.nl/~rwillems/
icq:177073635



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


RE: Nesting tiles puts and inserts

Posted by Richard Willemsen <rw...@xs4all.nl>.
Hi All,

FYI, this works fine with the nightly build of 24/5.

Kind regards,
Richard

> -----Original Message-----
> From: Richard Willemsen [mailto:rwillems@xs4all.nl] 
> Sent: 23 May 2003 14:01
> To: struts-user@jakarta.apache.org
> Subject: Nesting tiles puts and inserts
> 
> 
> Hi All,
> 
> I'm a newbie concerning Tiles. I'm just trying something out 
> but I'm beginning to wonder if this is actually possible. See 
> the example JSP part.
> 
> ....
> <tiles:insert definition="document">
>   <tiles:put name="title" value="Test document" type="string"/>
>   <tiles:put name="body" type="string">
> 
>     <tiles:insert definition="panel">
>       <tiles:put name="title" value="Test Panel" type="string"/>
>       <tiles:put name="body" type="string">
>         
>         <tiles:insert definition="section">
>           <tiles:put name="title" value="Test Section" type="string"/>
>           <tiles:put name="body" type="string">
>             <p>Section content.</p>
>           </tiles:put>
>         </tiles:insert>
>           
>       </tiles:put>
>     </tiles:insert>
>       
>   </tiles:put>
> </tiles:insert>
> ....
> 
> As you'll probably notice, I'm trying to nest a section in a 
> panel and that panel in a document again. FYI, the section 
> and panels should more-or-less produce a table in a table. 
> The document is straight forward html/head/body tag stuff.
> 
> The result of this is that the section is NOT included in the 
> panel and the panel is NOT included in the document. The 
> section is 'printed' before the panel and the panel is 
> 'printed' before the document. As in:
> 
> Expected:
>   <document>
>     <panel>
>       <section>
>         content
>       </section>
>     </panel>
>    </document>
> 
> Actual result:
>   <section>
>     content>
>   </section>
>   <panel>
>   </panel>
>   <document>
>   </document>
> 
> I'm pretty sure this is due of printing directly to the same 
> JspWriter (am I right?). I'm actually wondering if such 
> nesting is even possible.
> 
> Any tips or hints would be greatly appreciated.
> 
> Kind regards,
> Richard
> 
> -- 
> Richard Willemsen
> mailto:rwillems@xs4all.nl
> http://www.xs4all.nl/~rwillems/
> icq:177073635
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 
> 



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