2008/10/22 stanlick <[EMAIL PROTECTED]>: > <definition name="myapp.header" template="/tiles/header.jsp"> > ... > <put-attribute name="breadcrumbs" value="/tiles/header-breadcrumbs.jsp" > /> > </definition> >... > > <definition name="myapp.homePage" template="/layouts/page-container.jsp"> > <put-attribute name="header" value="myapp.header" /> > </definition> >... > <definition name="myapp.homePageNoCrumbs" extends="myapp.homePage"> > <put-attribute name="title" value="Prototype Struts 2 Web Application > with NO CRUMBS" /> > <put-attribute name="myapp.header.breadcrumbs" value="/tiles/blank.jsp" > /> > </definition> > > Is it possible to override nested attributes in a sub-definition?
In Tiles 2.0 never, in Tiles 2.1 there is a possibility. *Don't* define the "breadcrumbs" attribute in "myapp.header" and define a cascaded attribute in myapp.homePage and myapp.homePageNoCrumbs: <definition name="myapp.homePage" template="/layouts/page-container.jsp"> ... <put-attribute name="header" value="myapp.header" /> <put-attribute name="breadcrumbs" value="/tiles/header-breadcrumbs.jsp" /> </definition> <definition name="myapp.homePageNoCrumbs" extends="myapp.homePage"> ... <put-attribute name="breadcrumbs" value="/tiles/blank.jsp" /> </definition> If you still are using Tiles 2.0, then you have to create a definition that extends myapp.header.breadcrumbs and put it as the "header" attribute in myapp.homePageNoCrumbs. HTH Antonio
