struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Takacs <>
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 "" 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".

<!-- '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"/>

<!-- '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" />

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

/layouts/breadcrumb.jps:  (simplified)

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


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

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?


Do You Yahoo!?
HotJobs - Search Thousands of New Jobs

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message