2007/7/31, Neil Aggarwal <[EMAIL PROTECTED]>: > According to the Tiles FAQ: > > I filled an attribute of a template, but it did not get > in an inner template. What happened? > > Attributes must be filled in the correct template. In other words, > there are no "pass-through" attributes, that you fill in the > master template and get filled in the inner ones. > ... > Is there a way to tell productNavLayout.jsp to > pull it from layout.jsp's attributes?
The solution is in the second sentence of the FAQ: <snip> In this case, usually you have to create a new definition extending from an existing one, fill the attribute in the correct template and assign the new definition as an attribute to the main template. </snip> In other words: <definition name="product.nav" template="/productNavLayout.jsp"> <put-attribute name="productPathNav" value="/productPathNav.jsp" /> <put-attribute name="productNav" value="/productNav.jsp" /> </definition> <definition name="product.nav.extended" extends="product.nav"> <put-attribute name="productContent" value="product.grid" /> </definition> <definition name="page.products" extends="layout"> <put-attribute name="content" value="product.nav.extended" /> </definition> HTH Antonio > Thanks, > Neil > > -- > Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com > FREE! Eliminate junk email and reclaim your inbox. > Visit http://www.spammilter.com for details. > > -----Original Message----- > From: Antonio Petrelli [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 31, 2007 1:58 AM > To: [email protected] > Subject: Re: Nesting tiles 3 levels deep not finding attribute > > 2007/7/31, Neil Aggarwal <[EMAIL PROTECTED]>: > > > > Hello: > > > > I have been doing some googling on this and I > > came across this post: > > http://www.mail-archive.com/[EMAIL PROTECTED]/msg24016.html > > > > So, attributes do not cascade and I have to push them down > > to the nested tiles. > > > > Looking at the syntax on that page, I took a look at > > the tiles:putAttribute tag but I cannot figure out > > how to do it. > > > > I think this is not your case: your Tiles definitions seem to be correctly > defined. In fact, the attribute "productContent" is bound to definition " > product.grid", so I think your problem is another. > First of all, what version of Tiles are you using? Are you using it together > with a web framework? > And did you receive errors at the startup of the application? > > Antonio > >
