whitecoffee
whitecoffee

Reputation: 1045

In SiteMesh, is there any way to apply multiple decorators to one file?

I want to apply multiple decorators to one jsp file.

Here is my decorators.xml:

<decorators defaultdir="/WEB-INF/jsp/decorator">
    <decorator name="right-nav" page="right-nav.jsp">
        <pattern>/WEB-INF/jsp/index.jsp</pattern>
    </decorator>

    <decorator name="top-bottom" page="top-bottom.jsp">
        <pattern>/WEB-INF/jsp/index.jsp</pattern>
    </decorator>
</decorators>

The first decorator adds a navigation menu on the right. The second decorator adds top banner and bottom banner.

I have tried many ways, but I could only get one decorator applied even if I reorder the decorators. I read the documentation, found that only one decorator can be applied at a time.

So, is there any way to apply multiple decorators to a single file? Can a decorator inherits from another?

Upvotes: 1

Views: 1312

Answers (1)

whitecoffee
whitecoffee

Reputation: 1045

Well, SiteMesh 3 can do this:

http://wiki.sitemesh.org/wiki/pages/viewpage.action?pageId=1081348

Upvotes: 2

Related Questions