> -----Original Message-----
> From: Bill Schneider [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 31, 2004 8:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: including one layout .jsp inside another?
> 
> 
> I raised exactly the same question on this list a week or two 
> ago.  I'm 
> glad to see someone else attempting the same thing.
> 
> Two workarounds came out of that discussion--structure your 
> tiles defs 
> differently, or futz with <tiles:importAttribute> and 
> <tiles:put>.  The 
> first approach doesn't scale well, because for every page 
> that includes 
> tabs, you need two tiles defs instead of one.  (It gets worse if you 
> have subtabs.)  The second approach works but is a kludge, 
> not a clean 
> solution.
> 
> Unfortunately, there does not seem to be a "good" way to handle this 
> case with Tiles.

I dunno.. I've been doing this at least once every 2 or three weeks accidently with 
forwards and action classes.
I usually have an action class that forwards to a definition, and try to put it where 
I really want a jsp page.
Scales as well as your html is coded too....

> 
> -- Bill
> 
> > I am trying to define a layout, one component of which is 
> another layout:
> > 
> > 
> >   <definition name="main" path="/WEB-INF/jsp/layouts/main.jsp"> 
> >     <put name="top" value="/WEB-INF/jsp/common/top.jsp" />
> >     <put name="leftNav" value="/WEB-INF/jsp/common/leftNav.jsp" />
> >   </definition>
> > 
> > 
> >   <definition name="tabs" extends="main"> 
> >     <put name="body" value="/WEB-INF/jsp/foo/tabs.jsp" />
> >   </definition>
> > 
> >   <definition name="list" extends="tabs" >
> >     <put name="view" value="/WEB-INF/jsp/foo/list.jsp" /> 
> >   </definition>
> > 
> > 
> >   main.jsp:
> > 
> >   <html:html>
> >     <body>
> >       <tiles:insert attribute="top" />
> >       <tiles:insert attribute="leftNav" />
> >       <tiles:insert attribute="body" />
> >     </body>
> >   </html:html>
> > 
> > 
> >   tabs.jsp:
> > 
> >   <tiles:insert attribute="view" />
> > 
> > 
> > When I forward to "list", main loads, it's children, including tabs,
> > but when tabs tries to load list as a child, I get this error:
> > 
> >   [ServletException in:/WEB-INF/jsp/foo/tabs.jsp] 
> >       Error - Tag Insert : No value found for attribute 'view'.' 
> > 
> > 
> > I have tried numerous variants of my tiles defs and tiles 
> tags, but I
> > can't get it to work.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

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

Reply via email to