Nesting decorators?

Richard Osbaldeston <[email protected]> Fri, 23 Sep 2005 08:33:41 CDT
Newsgroups gmane.comp.web.sitemesh.general,gmane.comp.lang.pnuts.user
Message-ID <31768632.1127482451772.JavaMail.os-j2ee@opensymphony01.contegix.com>
Is it possible to nest SiteMesh decorators? Not sure how I should be structuring Spring MVC views consisting for several reusable sub components.

Eg. I have a decorator 'main' like

<html>
<head></head>
<body>
(footer...)
(navigation...)
(menus...)
<decorator:body/>
(footer...)
</body>
<html>

Now I need a more specific version where the <decorator:body/> contains other sub-components. Reading the documentation suggests I can only duplicate the decorator a second time lets say to 'detailed.jsp' and replace the above <decorator:body/> with several <page:apply-decorator> tags. Obviously this duplicates a lot of the shared page layout all the (footer...) (navigation...) (menus...) (footer...) stuff. Is it possible to nest the tags so that the 'detailed.jsp' (page:apply-decorator) tags can be substituted into the body of the main.jsp decorator? something like main.applydecorator(detailed.applydecorator())?

I could breakup the shared stuff into jsp includes.. but that seems to negate the usefulness of SiteMesh in the first place (we've already got a site which uses dozens of jsp include chunks and I'm trying to simplify things).

---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=7104&messageID=15768#15768


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]