struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Takacs <mtak...@yahoo.com>
Subject Tiles, overriding extended definitions and Breadcrumbing
Date Mon, 19 Aug 2002 10:07:59 GMT
Summary: Can a page override a sub-definition?  


Im trying to do breadcrumb, whee.   I've made a page definition with
over-riddes... works great.  Having a subLayout definition SEEMED to
work ok, until I tried to override parts of the sub-definition.

In other words, the "body" definition for "page.arc.help" can override
the "body" definitions in "page.arc" just fine, but I cant seem to
override the "trail" definitions in the subLayout, "page.tile.crumb".  
When I do provide an override, it ignores it and used the default
"trail" definition I've used when initially defining "page.tile.crumb".
 Grr.


<!-- 'Base' Definition for a page -->
<definition name="page.arc" template="/layouts/baseLayout.jsp">
    <put name="body"       content="/tiles/common/body.jsp" />
    <put name="breadcrumb" content="page.tile.crumb" />
    <put name="footer"     content="/tiles/common/footer.jsp" />
    <put name="header"     content="/tiles/common/header.jsp" />
    <put name="title"      content="/tiles/common/title.jsp"/>
</definition>

<!-- 'Crumb' has a sublayout -->
<definition name="page.tile.crumb" template="/layouts/breadcrumb.jsp">
    <put name="trail"    content="/tiles/common/crumbTrail.jsp" />
    <put name="static"  content="/tiles/common/crumbHelp.jsp" />
</definition>

<!-- Individual pages extending the 'Base' Definition  -->
<definition name="page.arc.help" extends="page.arc">
    <put name="body"    content="/tiles/help.jsp"/>
    <put name="trail"   content="/tiles/crumbs/help.jsp"/>
</definition>


----------
/layouts/breadcrumb.jps:  (simplified)

<tiles:insert attribute="trail"/>
<tiles:insert attribute="static"/>

-----

In my defintion for "page.arc.help", the "trail" override isnt being
used, the original one defined in "page.tile.crumb" is always being
used..    

If I flatted the hiearchy  (include the 2 pieces of the breadcrumb
layout directly in the baseLayout.jsp) it works just fine.  

So Im guessing tiles doesnt support overriding child definitions?

-tak



__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message