You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Asad Habib <as...@gmail.com> on 2008/02/12 05:01:05 UTC
Advanced Use of Struts Tiles
Hello. I have the following definitions in place in my tiles-def.xml file:
<definition name=".leftContentLayout"
path="/external/jsp/layouts/leftContentLayout.jsp">
<put name="leftUpperContent"
value="/external/jsp/common/leftMenu.jsp" />
<put name="leftLowerContent" value="" />
</definition>
<definition name=".middleContentLayout"
path="/external/jsp/layouts/middleContentLayout.jsp">
<put name="middleUpperContent" value="" />
<put name="middleCenterContent" value="" />
<put name="middleLowerContent" value="" />
</definition>
<definition name=".rightContentLayout"
path="/external/jsp/layouts/rightContentLayout.jsp">
<put name="rightUpperContent" value="/external/jsp/home/news.jsp" />
<put name="rightLowerContent" value="/external/jsp/home/announcements.jsp" />
</definition>
<definition name=".mainContentLayout"
path="/external/jsp/layouts/mainContentLayout.jsp">
<put name="leftContent" value=".leftContentLayout" />
<put name="middleContent" value=".middleContentLayout" />
<put name="rightContent" value="" />
</definition>
<definition name=".externalMainLayout"
path="/external/jsp/layouts/externalMainLayout.jsp">
<put name="title" value="" />
<put name="header" value="/external/jsp/common/header.jsp" />
<put name="mainContents" value=".mainContentLayout" />
<put name="footer" value="/external/jsp/common/footer.jsp" />
</definition>
There are several layers of nested tiles. I am having trouble using
this. Are there any examples of nesting that is several layers deep
online? Thank you.
- Asad
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Advanced Use of Struts Tiles
Posted by Antonio Petrelli <an...@gmail.com>.
2008/2/12, Asad Habib <as...@gmail.com>:
>
> Hello Antonio. Do you have access to any examples that I could look at?
> Thanks.
The example is in the code that you posted :-)
.mainContentLayout contains .middleContentLayout.
.externalMainLayour contains .mainContentLayout.
<definition name=".mainContentLayout"
path="/external/jsp/layouts/mainContentLayout.jsp">
<put name="leftContent" value=".leftContentLayout" />
<put name="middleContent" value=".middleContentLayout" />
<put name="rightContent" value="" />
</definition>
<definition name=".externalMainLayout"
path="/external/jsp/layouts/externalMainLayout.jsp">
<put name="title" value="" />
<put name="header" value="/external/jsp/common/header.jsp" />
<put name="mainContents" value=".mainContentLayout" />
<put name="footer" value="/external/jsp/common/footer.jsp" />
</definition>
Antonio
Re: Advanced Use of Struts Tiles
Posted by Asad Habib <as...@gmail.com>.
Hello Antonio. Do you have access to any examples that I could look at? Thanks.
- Asad
On Feb 12, 2008 4:27 AM, Antonio Petrelli <an...@gmail.com> wrote:
> 2008/2/12, Asad Habib <as...@gmail.com>:
> >
> > Hello Antonio. Are you saying that multiple level nesting is not
> > possible with Struts Tiles?
>
>
>
> Yes it is possible: as long as you are able to do single-level nesting, you
> can nest at all levels.
> What I meant is that it is "difficult" since you have to create definitions
> over and over.
>
> Antonio
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Advanced Use of Struts Tiles
Posted by Antonio Petrelli <an...@gmail.com>.
2008/2/12, Asad Habib <as...@gmail.com>:
>
> Hello Antonio. Are you saying that multiple level nesting is not
> possible with Struts Tiles?
Yes it is possible: as long as you are able to do single-level nesting, you
can nest at all levels.
What I meant is that it is "difficult" since you have to create definitions
over and over.
Antonio
Re: Advanced Use of Struts Tiles
Posted by Asad Habib <as...@gmail.com>.
Hello Antonio. Are you saying that multiple level nesting is not
possible with Struts Tiles? Cedric has demonstrated single level
nesting in one of his articles so I was hoping that it would be.
Anyway, I appreciate your feedback. If anyone has done this with
Struts Tiles, I would appreciate your help. Thank you.
- Asad
On Feb 12, 2008 3:10 AM, Antonio Petrelli <an...@gmail.com> wrote:
> 2008/2/12, Asad Habib <as...@gmail.com>:
> >
> > Hello. I have the following definitions in place in my tiles-def.xml file:
> > ...
> > There are several layers of nested tiles. I am having trouble using
> > this. Are there any examples of nesting that is several layers deep
> > online? Thank you.
>
>
>
> I have to say that nesting definitions in Struts-Tiles is very difficult,
> and the same for the current version of Tiles 2 (2.0.5).
> In fact you already have an example of what nesting definition means. I
> filed a JIRA issue for this at Tiles 2:
> https://issues.apache.org/struts/browse/TILES-85
> The patch is, anyway, outdated.
>
> If you are willing to migrate to Tiles 2, there is a chance that this issue
> will be fixed; if you want to stick with Struts-Tiles, nothing will change,
> since Struts-Tiles will not be updated anymore (with the exception of
> security issues).
>
> Antonio
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Advanced Use of Struts Tiles
Posted by Antonio Petrelli <an...@gmail.com>.
2008/2/12, Asad Habib <as...@gmail.com>:
>
> Hello. I have the following definitions in place in my tiles-def.xml file:
> ...
> There are several layers of nested tiles. I am having trouble using
> this. Are there any examples of nesting that is several layers deep
> online? Thank you.
I have to say that nesting definitions in Struts-Tiles is very difficult,
and the same for the current version of Tiles 2 (2.0.5).
In fact you already have an example of what nesting definition means. I
filed a JIRA issue for this at Tiles 2:
https://issues.apache.org/struts/browse/TILES-85
The patch is, anyway, outdated.
If you are willing to migrate to Tiles 2, there is a chance that this issue
will be fixed; if you want to stick with Struts-Tiles, nothing will change,
since Struts-Tiles will not be updated anymore (with the exception of
security issues).
Antonio