You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by James Prance <Ja...@hotmail.com> on 2003/03/03 11:49:52 UTC

Tiles Body question

In a classic template, the header, footer and menu could be common across
your application.
However the body would likely change depending on the business process.

Is there a way to alter the 'body' value dynamically? I'm a bit confused by
this at the moment and my current understanding is that you need a new
'layout' for each differing 'body' page..

is this correct or am i totally arse about face?


James






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


AW: AW: AW: AW: Tiles Body question

Posted by Roland Berger <be...@bluewin.ch>.
Tomcat 4.1.18

Can I teach it to deal right with inclusion?

Regards
Roland

-----Ursprüngliche Nachricht-----
Von: Cedric Dumoulin [mailto:cedric@apache.org]
Gesendet: Dienstag, 4. März 2003 16:59
An: Struts Users Mailing List
Betreff: Re: AW: AW: AW: Tiles Body question




Roland Berger wrote:

>Yes, the Tag's surrounding <tiles:insert> are:
>
><nested:form  ...>
>  <nested:nest ...>
>    <nested:nest  ...>
>      <table ...>
>        <tr ...>
>          <td ...>
>            <tiles:insert ...>
>
>Do you know a work around?
>
  No workaround apart not using <nested:nest >.

  The problem is not from Tiles, but from the jsp spec: it is not
allowed to flush inside a BodyTag.
  Also, your webserver seem to deal badly with inclusion because when
you set flush="false", the tiles should normally appear at its right
place, not at the top of page. What webserver do you use ?

     Cedric

>
>Thank's
>Roland
>
>-----Ursprüngliche Nachricht-----
>Von: Cedric Dumoulin [mailto:cedric@apache.org]
>Gesendet: Dienstag, 4. März 2003 11:33
>An: Struts Users Mailing List
>Betreff: Re: AW: AW: Tiles Body question
>
>
>
>  The configuration you propose should work. All example ship with
>struts are based on this kind of nesting (portal, tabs, menu, ...).
>  The reported exception usually appear when an <insert ...> is
>performed inside a tag implementing the BodyTag interface (like insert,
>iterate, ...).
>  Is there a tag surrounding <tiles:insert ...> in your memberDetail.jsp
>file ?
>
>  Cedric
>
>
>
>
>


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


AW: AW: AW: AW: Tiles Body question

Posted by Roland Berger <be...@bluewin.ch>.
Hi Cedric

Thanks a lot for your help. I could rearange and rename the tags like
follows:

<html:form  ...>
   <tiles:insert ...>
     <nested:nest ...>
     <nested:nest  ...>
       <table ...>
        <tr ...>
          <td ...>

Now it works.

Thanks
Roland

-----Ursprüngliche Nachricht-----
Von: Cedric Dumoulin [mailto:cedric@apache.org]
Gesendet: Dienstag, 4. März 2003 16:59
An: Struts Users Mailing List
Betreff: Re: AW: AW: AW: Tiles Body question




Roland Berger wrote:

>Yes, the Tag's surrounding <tiles:insert> are:
>
><nested:form  ...>
>  <nested:nest ...>
>    <nested:nest  ...>
>      <table ...>
>        <tr ...>
>          <td ...>
>            <tiles:insert ...>
>
>Do you know a work around?
>
  No workaround apart not using <nested:nest >.

  The problem is not from Tiles, but from the jsp spec: it is not
allowed to flush inside a BodyTag.
  Also, your webserver seem to deal badly with inclusion because when
you set flush="false", the tiles should normally appear at its right
place, not at the top of page. What webserver do you use ?

     Cedric

>
>Thank's
>Roland
>
>-----Ursprüngliche Nachricht-----
>Von: Cedric Dumoulin [mailto:cedric@apache.org]
>Gesendet: Dienstag, 4. März 2003 11:33
>An: Struts Users Mailing List
>Betreff: Re: AW: AW: Tiles Body question
>
>
>
>  The configuration you propose should work. All example ship with
>struts are based on this kind of nesting (portal, tabs, menu, ...).
>  The reported exception usually appear when an <insert ...> is
>performed inside a tag implementing the BodyTag interface (like insert,
>iterate, ...).
>  Is there a tag surrounding <tiles:insert ...> in your memberDetail.jsp
>file ?
>
>  Cedric
>
>
>
>
>


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


Re: AW: AW: AW: Tiles Body question

Posted by Cedric Dumoulin <ce...@apache.org>.

Roland Berger wrote:

>Yes, the Tag's surrounding <tiles:insert> are:
>
><nested:form  ...>
>  <nested:nest ...>
>    <nested:nest  ...>
>      <table ...>
>        <tr ...>
>          <td ...>
>            <tiles:insert ...>
>
>Do you know a work around?
>
  No workaround apart not using <nested:nest >.

  The problem is not from Tiles, but from the jsp spec: it is not 
allowed to flush inside a BodyTag.
  Also, your webserver seem to deal badly with inclusion because when 
you set flush="false", the tiles should normally appear at its right 
place, not at the top of page. What webserver do you use ?

     Cedric

>
>Thank's
>Roland
>
>-----Ursprüngliche Nachricht-----
>Von: Cedric Dumoulin [mailto:cedric@apache.org]
>Gesendet: Dienstag, 4. März 2003 11:33
>An: Struts Users Mailing List
>Betreff: Re: AW: AW: Tiles Body question
>
>
>
>  The configuration you propose should work. All example ship with
>struts are based on this kind of nesting (portal, tabs, menu, ...).
>  The reported exception usually appear when an <insert ...> is
>performed inside a tag implementing the BodyTag interface (like insert,
>iterate, ...).
>  Is there a tag surrounding <tiles:insert ...> in your memberDetail.jsp
>file ?
>
>  Cedric
>
>  
>
>  
>


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


AW: AW: AW: Tiles Body question

Posted by Roland Berger <be...@bluewin.ch>.
Yes, the Tag's surrounding <tiles:insert> are:

<nested:form  ...>
  <nested:nest ...>
    <nested:nest  ...>
      <table ...>
        <tr ...>
          <td ...>
            <tiles:insert ...>

Do you know a work around?

Thank's
Roland

-----Ursprüngliche Nachricht-----
Von: Cedric Dumoulin [mailto:cedric@apache.org]
Gesendet: Dienstag, 4. März 2003 11:33
An: Struts Users Mailing List
Betreff: Re: AW: AW: Tiles Body question



  The configuration you propose should work. All example ship with
struts are based on this kind of nesting (portal, tabs, menu, ...).
  The reported exception usually appear when an <insert ...> is
performed inside a tag implementing the BodyTag interface (like insert,
iterate, ...).
  Is there a tag surrounding <tiles:insert ...> in your memberDetail.jsp
file ?

  Cedric

Roland Berger wrote:

>Hi Cedric
>
>Sorry, but I can not find the problem even with the examples. I belive I do
>it the same way as it is done there.
>
>May be you can have a look at the code below:
>
>*** tiles-defs.xml snippets ***
>
>    <definition name=".detailLayout"
>path="/WEB-INF/common/layouts/detailLayout.jsp">
>       ...
>    </definition>
>
>    <definition name=".pages.member.detail.show" extends=".detailLayout">
>        <put name="body"  value=".pages.member.detail.show.head"/>
>    </definition>
>
>    <definition name=".pages.member.detail.show.head"
>path="/WEB-INF/pages/memberDetail.jsp" >
>        <put name="bodyHead"
>value="/WEB-INF/pages/memberDetailShowHead.jsp"/>
>    </definition>
>
>
>**** involved jsp page snippets ****
>
>File: detailLayout.jsp
>    <tiles:insert  attribute="body" />
>
>File: memberDetail.jsp
>    <tiles:insert  attribute="bodyHead" flush="false"/>
>
>Remark:
>If I don't set flush to false I get:
>
>Can't insert page '/WEB-INF/pages/memberDetailShowHead.jsp' : Illegal to
>flush within a custom tag java.io.IOException: Illegal to flush within a
>custom tag at
>javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:115) at
>org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.j
a
>va:817) at
>
>Again, the page memberDetailShowHead.jsp is put at the beginning of
>memberDetail.jsp and not where the <tiles:insert  attribute="bodyHead"
>flush="false"/> tag is.
>
>
>Thank you very much
>Roland
>
>
>
>-----Ursprüngliche Nachricht-----
>Von: Cedric Dumoulin [mailto:cedric@apache.org]
>Gesendet: Montag, 3. März 2003 18:08
>An: Struts Users Mailing List
>Betreff: Re: AW: Tiles Body question
>
>
>
>  The examples in struts-documentation use a master layout
>(classicLayout.jsp), and the body is often made of tiles inserted with
>another layout (like columnsLayout, vboxLayout, tabsLayout...). You can
>easily define your own layout with an insert. It is also possible to
>insert the definition corresponding to a page inside a nested bodies
>(see the tabs in the example directory).
>
>  Maybe I have miss something in what you are trying to do ...
>
>    Cedric
>
>Roland Berger wrote:
>
>
>
>>Yes, that's exactly what I also want to do. But it seems that I missed the
>>big picture. When I set flush="true" I get a Illegal to flush error. If I
>>set flush="false" the tile I want to insert into the "body template" is
>>inserted at the top of the page and not where the insert tag is. Can you
>>give a small example with tiles-defs.xml and the JSP Part?
>>
>>( see also thread:  'tiles insert in "sub layout"' )
>>
>>Thanks a lot.
>>Roland.
>>
>>-----Ursprüngliche Nachricht-----
>>Von: Cedric Dumoulin [mailto:cedric@apache.org]
>>Gesendet: Samstag, 22. Februar 2003 14:13
>>An: Struts Users Mailing List
>>Betreff: Re: Tiles Body question
>>
>>
>>
>> You can have a body acting as a "body template" which in turn insert
>>other bodies ...
>>
>>   Cedric
>>
>>James Prance wrote:
>>
>>
>>
>>
>>
>>>In a classic template, the header, footer and menu could be common across
>>>your application.
>>>However the body would likely change depending on the business process.
>>>
>>>Is there a way to alter the 'body' value dynamically? I'm a bit confused
>>>
>>>
>by
>
>
>>>this at the moment and my current understanding is that you need a new
>>>'layout' for each differing 'body' page..
>>>
>>>is this correct or am i totally arse about face?
>>>
>>>
>>>James
>>>
>>>
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>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
>>
>>
>>
>>---------------------------------------------------------------------
>>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
>
>
>
>---------------------------------------------------------------------
>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



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


Re: AW: AW: Tiles Body question

Posted by Cedric Dumoulin <ce...@apache.org>.
  The configuration you propose should work. All example ship with 
struts are based on this kind of nesting (portal, tabs, menu, ...).
  The reported exception usually appear when an <insert ...> is 
performed inside a tag implementing the BodyTag interface (like insert, 
iterate, ...).
  Is there a tag surrounding <tiles:insert ...> in your memberDetail.jsp 
file ?

  Cedric

Roland Berger wrote:

>Hi Cedric
>
>Sorry, but I can not find the problem even with the examples. I belive I do
>it the same way as it is done there.
>
>May be you can have a look at the code below:
>
>*** tiles-defs.xml snippets ***
>
>    <definition name=".detailLayout"
>path="/WEB-INF/common/layouts/detailLayout.jsp">
>       ...
>    </definition>
>
>    <definition name=".pages.member.detail.show" extends=".detailLayout">
>        <put name="body"  value=".pages.member.detail.show.head"/>
>    </definition>
>
>    <definition name=".pages.member.detail.show.head"
>path="/WEB-INF/pages/memberDetail.jsp" >
>        <put name="bodyHead"
>value="/WEB-INF/pages/memberDetailShowHead.jsp"/>
>    </definition>
>
>
>**** involved jsp page snippets ****
>
>File: detailLayout.jsp
>    <tiles:insert  attribute="body" />
>
>File: memberDetail.jsp
>    <tiles:insert  attribute="bodyHead" flush="false"/>
>
>Remark:
>If I don't set flush to false I get:
>
>Can't insert page '/WEB-INF/pages/memberDetailShowHead.jsp' : Illegal to
>flush within a custom tag java.io.IOException: Illegal to flush within a
>custom tag at
>javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:115) at
>org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
>va:817) at
>
>Again, the page memberDetailShowHead.jsp is put at the beginning of
>memberDetail.jsp and not where the <tiles:insert  attribute="bodyHead"
>flush="false"/> tag is.
>
>
>Thank you very much
>Roland
>
>
>
>-----Ursprüngliche Nachricht-----
>Von: Cedric Dumoulin [mailto:cedric@apache.org]
>Gesendet: Montag, 3. März 2003 18:08
>An: Struts Users Mailing List
>Betreff: Re: AW: Tiles Body question
>
>
>
>  The examples in struts-documentation use a master layout
>(classicLayout.jsp), and the body is often made of tiles inserted with
>another layout (like columnsLayout, vboxLayout, tabsLayout...). You can
>easily define your own layout with an insert. It is also possible to
>insert the definition corresponding to a page inside a nested bodies
>(see the tabs in the example directory).
>
>  Maybe I have miss something in what you are trying to do ...
>
>    Cedric
>
>Roland Berger wrote:
>
>  
>
>>Yes, that's exactly what I also want to do. But it seems that I missed the
>>big picture. When I set flush="true" I get a Illegal to flush error. If I
>>set flush="false" the tile I want to insert into the "body template" is
>>inserted at the top of the page and not where the insert tag is. Can you
>>give a small example with tiles-defs.xml and the JSP Part?
>>
>>( see also thread:  'tiles insert in "sub layout"' )
>>
>>Thanks a lot.
>>Roland.
>>
>>-----Ursprüngliche Nachricht-----
>>Von: Cedric Dumoulin [mailto:cedric@apache.org]
>>Gesendet: Samstag, 22. Februar 2003 14:13
>>An: Struts Users Mailing List
>>Betreff: Re: Tiles Body question
>>
>>
>>
>> You can have a body acting as a "body template" which in turn insert
>>other bodies ...
>>
>>   Cedric
>>
>>James Prance wrote:
>>
>>
>>
>>    
>>
>>>In a classic template, the header, footer and menu could be common across
>>>your application.
>>>However the body would likely change depending on the business process.
>>>
>>>Is there a way to alter the 'body' value dynamically? I'm a bit confused
>>>      
>>>
>by
>  
>
>>>this at the moment and my current understanding is that you need a new
>>>'layout' for each differing 'body' page..
>>>
>>>is this correct or am i totally arse about face?
>>>
>>>
>>>James
>>>
>>>
>>>
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>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
>>
>>
>>
>>---------------------------------------------------------------------
>>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
>
>
>
>---------------------------------------------------------------------
>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


AW: AW: Tiles Body question

Posted by Roland Berger <be...@bluewin.ch>.
Hi Cedric

Sorry, but I can not find the problem even with the examples. I belive I do
it the same way as it is done there.

May be you can have a look at the code below:

*** tiles-defs.xml snippets ***

    <definition name=".detailLayout"
path="/WEB-INF/common/layouts/detailLayout.jsp">
       ...
    </definition>

    <definition name=".pages.member.detail.show" extends=".detailLayout">
        <put name="body"  value=".pages.member.detail.show.head"/>
    </definition>

    <definition name=".pages.member.detail.show.head"
path="/WEB-INF/pages/memberDetail.jsp" >
        <put name="bodyHead"
value="/WEB-INF/pages/memberDetailShowHead.jsp"/>
    </definition>


**** involved jsp page snippets ****

File: detailLayout.jsp
    <tiles:insert  attribute="body" />

File: memberDetail.jsp
    <tiles:insert  attribute="bodyHead" flush="false"/>

Remark:
If I don't set flush to false I get:

Can't insert page '/WEB-INF/pages/memberDetailShowHead.jsp' : Illegal to
flush within a custom tag java.io.IOException: Illegal to flush within a
custom tag at
javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:115) at
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.ja
va:817) at

Again, the page memberDetailShowHead.jsp is put at the beginning of
memberDetail.jsp and not where the <tiles:insert  attribute="bodyHead"
flush="false"/> tag is.


Thank you very much
Roland



-----Ursprüngliche Nachricht-----
Von: Cedric Dumoulin [mailto:cedric@apache.org]
Gesendet: Montag, 3. März 2003 18:08
An: Struts Users Mailing List
Betreff: Re: AW: Tiles Body question



  The examples in struts-documentation use a master layout
(classicLayout.jsp), and the body is often made of tiles inserted with
another layout (like columnsLayout, vboxLayout, tabsLayout...). You can
easily define your own layout with an insert. It is also possible to
insert the definition corresponding to a page inside a nested bodies
(see the tabs in the example directory).

  Maybe I have miss something in what you are trying to do ...

    Cedric

Roland Berger wrote:

>Yes, that's exactly what I also want to do. But it seems that I missed the
>big picture. When I set flush="true" I get a Illegal to flush error. If I
>set flush="false" the tile I want to insert into the "body template" is
>inserted at the top of the page and not where the insert tag is. Can you
>give a small example with tiles-defs.xml and the JSP Part?
>
>( see also thread:  'tiles insert in "sub layout"' )
>
>Thanks a lot.
>Roland.
>
>-----Ursprüngliche Nachricht-----
>Von: Cedric Dumoulin [mailto:cedric@apache.org]
>Gesendet: Samstag, 22. Februar 2003 14:13
>An: Struts Users Mailing List
>Betreff: Re: Tiles Body question
>
>
>
>  You can have a body acting as a "body template" which in turn insert
>other bodies ...
>
>    Cedric
>
>James Prance wrote:
>
>
>
>>In a classic template, the header, footer and menu could be common across
>>your application.
>>However the body would likely change depending on the business process.
>>
>>Is there a way to alter the 'body' value dynamically? I'm a bit confused
by
>>this at the moment and my current understanding is that you need a new
>>'layout' for each differing 'body' page..
>>
>>is this correct or am i totally arse about face?
>>
>>
>>James
>>
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>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
>
>
>
>---------------------------------------------------------------------
>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



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


Re: AW: Tiles Body question

Posted by Cedric Dumoulin <ce...@apache.org>.
  The examples in struts-documentation use a master layout 
(classicLayout.jsp), and the body is often made of tiles inserted with 
another layout (like columnsLayout, vboxLayout, tabsLayout...). You can 
easily define your own layout with an insert. It is also possible to 
insert the definition corresponding to a page inside a nested bodies 
(see the tabs in the example directory).

  Maybe I have miss something in what you are trying to do ...

    Cedric

Roland Berger wrote:

>Yes, that's exactly what I also want to do. But it seems that I missed the
>big picture. When I set flush="true" I get a Illegal to flush error. If I
>set flush="false" the tile I want to insert into the "body template" is
>inserted at the top of the page and not where the insert tag is. Can you
>give a small example with tiles-defs.xml and the JSP Part?
>
>( see also thread:  'tiles insert in "sub layout"' )
>
>Thanks a lot.
>Roland.
>
>-----Ursprüngliche Nachricht-----
>Von: Cedric Dumoulin [mailto:cedric@apache.org]
>Gesendet: Samstag, 22. Februar 2003 14:13
>An: Struts Users Mailing List
>Betreff: Re: Tiles Body question
>
>
>
>  You can have a body acting as a "body template" which in turn insert
>other bodies ...
>
>    Cedric
>
>James Prance wrote:
>
>  
>
>>In a classic template, the header, footer and menu could be common across
>>your application.
>>However the body would likely change depending on the business process.
>>
>>Is there a way to alter the 'body' value dynamically? I'm a bit confused by
>>this at the moment and my current understanding is that you need a new
>>'layout' for each differing 'body' page..
>>
>>is this correct or am i totally arse about face?
>>
>>
>>James
>>
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>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
>
>
>
>---------------------------------------------------------------------
>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


AW: Tiles Body question

Posted by Roland Berger <be...@bluewin.ch>.
Yes, that's exactly what I also want to do. But it seems that I missed the
big picture. When I set flush="true" I get a Illegal to flush error. If I
set flush="false" the tile I want to insert into the "body template" is
inserted at the top of the page and not where the insert tag is. Can you
give a small example with tiles-defs.xml and the JSP Part?

( see also thread:  'tiles insert in "sub layout"' )

Thanks a lot.
Roland.

-----Ursprüngliche Nachricht-----
Von: Cedric Dumoulin [mailto:cedric@apache.org]
Gesendet: Samstag, 22. Februar 2003 14:13
An: Struts Users Mailing List
Betreff: Re: Tiles Body question



  You can have a body acting as a "body template" which in turn insert
other bodies ...

    Cedric

James Prance wrote:

>In a classic template, the header, footer and menu could be common across
>your application.
>However the body would likely change depending on the business process.
>
>Is there a way to alter the 'body' value dynamically? I'm a bit confused by
>this at the moment and my current understanding is that you need a new
>'layout' for each differing 'body' page..
>
>is this correct or am i totally arse about face?
>
>
>James
>
>
>
>
>
>
>---------------------------------------------------------------------
>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



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


Re: Tiles Body question

Posted by Cedric Dumoulin <ce...@apache.org>.
  You can have a body acting as a "body template" which in turn insert 
other bodies ...

    Cedric

James Prance wrote:

>In a classic template, the header, footer and menu could be common across
>your application.
>However the body would likely change depending on the business process.
>
>Is there a way to alter the 'body' value dynamically? I'm a bit confused by
>this at the moment and my current understanding is that you need a new
>'layout' for each differing 'body' page..
>
>is this correct or am i totally arse about face?
>
>
>James
>
>
>
>
>
>
>---------------------------------------------------------------------
>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


Re: Tiles Body question

Posted by Eddie Bush <ek...@swbell.net>.
James,

The beauty of Tiles is that you can nest the templates really easily. 
 Have you been fooling with Tiles long?  You might consider looking over 
the tiles-documentation.war file.  There are some fine examples of usage 
there.  The thing you need to wrap your head around is that the "body" 
could be a page - but could just as easily be another template!  Be 
careful to keep track of which templates are intended to be fragments 
though (ie. which ones contain "<html><body>...</body></html>" tags), as 
you could wind up with some unexpected output.

Just cram your nose into the examples inside of the 
tiles-documenation.war file and all should become clear ... after a 
requisite amount of tinkering and puttering (and grumbling, perhaps!). 
 "Playing" with technology such as this is seldom not instructive.

James Prance wrote:

>In a classic template, the header, footer and menu could be common across
>your application.
>However the body would likely change depending on the business process.
>
>Is there a way to alter the 'body' value dynamically? I'm a bit confused by
>this at the moment and my current understanding is that you need a new
>'layout' for each differing 'body' page..
>
>is this correct or am i totally arse about face?
>
>James
>

-- 
Eddie Bush





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