Subject: Tiles and putList From: "Matt Raible" <[EMAIL PROTECTED]> === I have the following definition:
<definition name="pageLayout" path="/layouts/pageLayout.jsp"> <putList name="screenStyles"> <add value="/styles/page.css"/> <add value="/styles/bluegray.css"/> </putList> </definition> Then in my pageLayout.jsp, I use the following to print out the stylesheets associated with a page: <style type="text/css" media="screen"> <tiles:useAttribute id="screenList" name="screenStyles" classname="java.util.List" /> <c:forEach var="stylesheet" items="${screenList}"> @import url(<%=request.getContextPath()%><c:out value="${stylesheet}"/>); </c:forEach> </style> This all works great. The enhancement I want to make is to define the different putList's so I can have "blueTheme" and "orangeTheme" as a definition. The reason is thus - if I want to override the list of stylesheets in a page that extends pageLayout, I have to add the full list again, thusly: <definition name="page.tools" extends="pageLayout"> <put name="title.key" value="tools.title"/> <put name="heading.key" value="tools.heading"/> <put name="content" value="/viewer/tools.jsp"/> <putList name="screenStyles"> <add value="/styles/page.css"/> <add value="/styles/orangegray.css"/> </putList> </definition> I'd like to have the following: <definition name="blueTheme"> <putList name="screenStyles"> <add value="/styles/page.css"/> <add value="/styles/bluegray.css"/> </putList> </definition> and then I could just change the "page.tools" definition to: <definition name="page.tools" extends="pageLayout"> <put name="title.key" value="tools.title"/> <put name="heading.key" value="tools.heading"/> <put name="content" value="/viewer/tools.jsp"/> <put name="screenStyles" value="blueTheme"/> </definition> However, this doesn't work. I'd tell you my error - but since my errorPage extends pageLayout - I end up in an infinite loop :( Thanks, Matt -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>