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