2009/11/15 Todd Nine <[email protected]>:
>  I extend an existing spring class to dynamically
> determine which page will be defined as the "body" definition.  This works
> well.  However I want each of my body pages to define what the title will be
> on the layout page.

I think that you may solve both of your needs (custom body and custom
title) by using a preparer and/or a placeholder:

    <definition name="*/prefix*"
template="/WEB-INF/views/layouts/default.jsp" preparer="my.Preparer">
        <put-attribute name="title" value="Default Title"/>
        <put-attribute name="header" value="/WEB-INF/views/tiles/header.jsp"
 />
        <put-attribute name="menu" value="/WEB-INF/views/tiles/menu.jsp" />
        <put-attribute name="footer" value="/WEB-INF/views/tiles/footer.jsp"
        <put-attribute name="body" value="/WEB-INF/edit/{2}.jsp" />
/>
    </definition>

You can even mix the placeholders with the preparer name.
See:
http://tiles.apache.org/framework/tutorial/advanced/preparer.html
http://tiles.apache.org/framework/tutorial/advanced/wildcard.html

HTH
Antonio

Reply via email to