I've been banging my head on this for about a day. I am trying to convert
to Tiles 2, but I haven't figured out the correct syntax of passing
attributes into a nested tile.
I am rendering the "Resources" def:
<definition name="DefaultLayout" template="/layout/default.jsp">
<put-attribute name="header" value="/layout/header.jsp"/>
</definition>
<definition name="Resources" extends="DefaultLayout">
<put-attribute name="Title" value="Resources" cascade="true"/>
<put-attribute name="HelpId" value="10000" cascade="true"/>
<put-attribute name="BannerImage" value="/img/logo.gif" cascade="true"/>
</definition>
default.jsp includes the "header":
<html>
<body>
<tiles:insertAttribute name="header"/>
</body>
</html>
And header.jsp is supposed to consume the cascaded Title, HelpId, and
BannerImage attributes:
<tiles:getAsString name="Title"/>
<tiles:getAsString name="HelpId"/>
<tiles:getAsString name="BannerImage"/>
Unfortunately this isn't working. I get this exception trying to pull out
those attributes:
*tag.getAsString : component context is not defined. Check tag syntax
*
Any idea what is causing my headache?
Thanks,
Paul