Kevin,

Yes, you can nest tiles within tiles!!! I use it heavily; I am pretty sure it's 
also documented,
but in case it's not clear, you should read this very advanced tutorial on 
Tiles - it basically
takes it to the max and exhausts what you can do with it:
http://www.lifl.fr/~dumoulin/tiles/doc/tutorial.html

Paul

--- "Leahy, Kevin" <[EMAIL PROTECTED]> wrote:

> Are you saying that the 'put' tag can take a another tile as its 'value'
> attribute? I think this could be the answer, but I haven't noticed this in
> the documentation - does anyone know of any examples online?
>  
> 
> -----Original Message-----
> From: Paul Benedict [mailto:[EMAIL PROTECTED] 
> Sent: 10 November 2005 00:00
> To: Struts Users Mailing List
> Subject: RE: Tiles: nesting one template inside another?
> 
> Kevin,
> 
> Follow this example. It uses a master layout [A] and then an inner layout
> [B]. You need to envision that the body content of A is B, and the body
> content of B is C.
> 
> <definition name="search_form_base" path="/layout/search_form_layout.jsp">
> <-- A
>       <put name="FilterA" value="/pageComponents/FilterA.jsp" />
>       <put name="FilterB" value="search_form_view" /> <-- B </definition>
> 
> <definition name="search_form_view" path="/pageComponents/FilterB.jsp">  <--
> B
>       <put name="Button1" value="/pageComponents/Button1.jsp" />  <-- C
> </definition>
> 
> --- "Leahy, Kevin" <[EMAIL PROTECTED]> wrote:
> 
> > Thanks for reply. But I'm not sure I really understand what you're 
> > suggesting.
> > What I really want is a way of something like this:
> > 
> > The base layout contains the menu and logo of company etc It has 
> > inside it a tiles insert for the body so that other tiles can add 
> > whatever body they want inside.
> > 
> > <definition name="cam.base" path="/layout/base_layout.jsp"> 
> > </definition>
> > 
> > Search form layout contains various filtering gadgets for the form and 
> > then some optional buttons and other gadgets that change slightly 
> > according to where the form is being used. E.g. in the edit view of 
> > the form you will have an 'update' button. In the search view of the 
> > form a 'search' button etc.
> > <definition name="search_form_base" path="/layout/search_form_layout.jsp">
> >             <put name="FilterA" value="/pageComponents/FilterA.jsp" />
> >             <put name="FilterB" value="/pageComponents/FilterB.jsp" /> 
> > </definition>
> > 
> > Here I want to use the base form layout with an extra button.
> > <definition name="search_form_view" extends="search_form_base">
> >             <put name="Button1" value="/pageComponents/Button1.jsp" /> 
> > </definition>
> > 
> > At the moment I have cut and pasted the base_layout into the 
> > search_form_layout. But I'm sure there must be a way of not 
> > duplicating this code.
> > 
> > Can anyone help with this?
> > 
> > Thanks in advance.
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf 
> > Of Yujun Liang
> > Sent: 09 November 2005 12:30
> > To: Struts Users Mailing List
> > Subject: Re: Tiles: nesting one template inside another?
> > 
> > Yes, you can use Layout B, just let xx be empty and yy be the content 
> > when showing layout A.
> > 
> > Regards
> > 
> > On 11/9/05, Leahy, Kevin <[EMAIL PROTECTED]> wrote:
> > >
> > > I have a generic company layout mainly composed of the menu 
> > > navigations system.
> > >
> > > I have also a 'Search' type form. The search form will be used in 
> > > various different tiles because it is relevant to View, Edit, 
> > > Update, Save etc functionality.
> > >
> > > What I want to do is kind of nest the Search Form layout inside the 
> > > generic company layout so that in my tiles definitions file I keep 
> > > the generic company part and still inject other tiles into the Form
> part.
> > >
> > > I have a generic layout A :
> > >
> > > <html>
> > > <head>
> > > <title><tiles:getAsString name="title" /></title> </head> <body> 
> > > <tiles:insert attribute="content" /> <script 
> > > language="JavaScript">buildMenus();</script>
> > > </body>
> > > </html>
> > >
> > > All pages will use this layout.
> > > But I also have a Search form that will be used in many pages: view, 
> > > edit, save etc.
> > >
> > > The form consists of many common elements and will change only 
> > > slightly according to context. At the moment I have implemented this 
> > > using a separate layout manager which is a cut and paste of layout A 
> > > but with other tiles inserts.
> > >
> > > <html>
> > > <head>
> > > <title><tiles:getAsString name="title" /></title> </head> <body> 
> > > <form> <tiles:insert attribute="xx" /> <tiles:insert attribute="yy" 
> > > /> </form> <script language="JavaScript">buildMenus();</script>
> > > </body>
> > > </html>
> > >
> > > But it seems that I should be able to define a the form as a layout 
> > > and use the generic layout as a starting point and inject the tiles 
> > > into the form layout.
> > >
> > > Am I just missing something obvious in the documentation? Or has 
> > > anyone done something similar?
> > >
> > > Many thanks
> > >
> > > Kevin
> > > ------
> > >
> > >
> > >
> > > --------------------------------------------------------------------
> > > --
> > > ---------- The information contained herein is confidential and is 
> > > intended solely for the addressee. Access by any other party is 
> > > unauthorised without the express written permission of the sender. 
> > > If you are not the intended recipient, please contact the sender 
> > > either via the company switchboard on +44 (0)20 7623 8000, or via 
> > > e-mail return. If you have received this e-mail in error or wish to 
> > > read our e-mail disclaimer statement and monitoring policy, please 
> > > refer to http://www.drkw.com/disc/email/ or contact the sender. 3167
> > >
> > > --------------------------------------------------------------------
> > > --
> > > ----------
> > >
> > >
> > >
> > 
> > 
> > --
> > Yujun Liang
> > [EMAIL PROTECTED]
> > 
> > 
> > ----------------------------------------------------------------------
> > ---------- The information contained herein is confidential and is 
> > intended solely for the addressee. Access by any other party is 
> > unauthorised without the express written permission of the sender. If 
> > you are not the intended recipient, please contact the sender either 
> > via the company switchboard on +44 (0)20 7623 8000, or via e-mail 
> > return. If you have received this e-mail in error or wish to read our 
> > e-mail disclaimer statement and monitoring policy, please refer to 
> > http://www.drkw.com/disc/email/ or contact the sender. 3167
> > ----------------------------------------------------------------------
> > ----------
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
>       
>               
> __________________________________
> Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>  ------
> 
> 
> --------------------------------------------------------------------------------
> The information contained herein is confidential and is intended solely for 
> the
> addressee. Access by any other party is unauthorised without the express
> written permission of the sender. If you are not the intended recipient, 
> please
> contact the sender either via the company switchboard on +44 (0)20 7623 8000, 
> or
> via e-mail return. If you have received this e-mail in error or wish to read 
> our
> e-mail disclaimer statement and monitoring policy, please refer to 
> http://www.drkw.com/disc/email/ or contact the sender. 3167
> --------------------------------------------------------------------------------
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
=== message truncated ===



                
__________________________________ 
Start your day with Yahoo! - Make it your home page! 
http://www.yahoo.com/r/hs

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

Reply via email to