You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by murthy gandikota <mu...@yahoo.com> on 2008/07/25 21:17:30 UTC
Beginner Question
I am entrusted with a major Tiles project. Almost all of the code was writter by outsources.
I see that they have defined:
a) a tiles.xml with definitions like
<definition name="lfp.tiles"
path="/HomePageTemplate.jsp">
<put name="top-header" value="/xyz.jsp" />
<put name="header" value="/r.jsp" />
<put name="menu" value="/n.jsp" />
<put name="footer" value="/ter.jsp" />
</definition>
b) a bunch of templates (e.g. HomePageTemplate.jsp) with code like
<tiles:insert attribute="top-header"/>
c) a bunch of JSP that are defined in the Templates
What I don't understand how does the application (Java Server Faces) know which template
to call?
I tried searching for TilesContainer in the java files but no hits. So they are not
using the templates dynamically. There is also a faces-navigation.xml which
does not refer to the templates.
Thanks for your help
Murthy
Re: Beginner Question
Posted by Antonio Petrelli <an...@gmail.com>.
2008/7/25 murthy gandikota <mu...@yahoo.com>:
> What I don't understand how does the application (Java Server Faces) know which template
> to call?
Errr... do you want us to know what your application does? This is
black magic :-D
> I tried searching for TilesContainer in the java files but no hits. So they are not
> using the templates dynamically.
>From your snippets of Tiles definition files, it seems that you are
using Tiles 1. TilesContainer is a concept of Tiles 2.
> There is also a faces-navigation.xml which
> does not refer to the templates.
Do you use MyFaces?
See: http://wiki.apache.org/myfaces/Tiles_and_JSF
Ciao
Antonio
Re: Beginner Question
Posted by murthy gandikota <mu...@yahoo.com>.
I see a bunch of declarations in tiles.xml like:
<definition name="/Prov.tiles"
extends="layoutRightPane.tiles">
<put name="title" value="xyz" />
<put name="body"
value="Prov.jsp" />
<put name="menu" value="Pane.jsp" />
</definition>
Guess when the Prov.jsp is called then it will use the layout Prov.tiles. The jsp value in body property should match with the definition name extending a tiles def. Seems very
convoluted. Any clarification is appreciated.
Thanks
Murthy
--- On Fri, 7/25/08, murthy gandikota <mu...@yahoo.com> wrote:
From: murthy gandikota <mu...@yahoo.com>
Subject: Beginner Question
To: users@tiles.apache.org
Date: Friday, July 25, 2008, 12:17 PM
I am entrusted with a major Tiles project. Almost all of the code was writter by
outsources.
I see that they have defined:
a) a tiles.xml with definitions like
<definition name="lfp.tiles"
path="/HomePageTemplate.jsp">
<put name="top-header" value="/xyz.jsp" />
<put name="header" value="/r.jsp" />
<put name="menu" value="/n.jsp" />
<put name="footer" value="/ter.jsp" />
</definition>
b) a bunch of templates (e.g. HomePageTemplate.jsp) with code like
<tiles:insert attribute="top-header"/>
c) a bunch of JSP that are defined in the Templates
What I don't understand how does the application (Java Server Faces) know
which template
to call?
I tried searching for TilesContainer in the java files but no hits. So they
are not
using the templates dynamically. There is also a faces-navigation.xml which
does not refer to the templates.
Thanks for your help
Murthy