tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Schwarz <c...@gmx.net>
Subject Dynamic attribute value
Date Tue, 08 Apr 2008 13:00:31 GMT


I want to use a value defined in the struts definition to be forwarded to a
tiles page.

in tiles-def.xml

<definition name="application.site" template="/fragments/layout.jsp">
  <put-attribute name="tiles.page" value="/fragments/tilespage.jsp" />
  <put-attribute name="site.name" value="The current site name" />

in layout.jsp

<t:insertAttribute name="tiles.page">
  <t:putAttribute name="tilesSiteName" value="..." />

How can I use the value of the definition in the putAttribute in the

I tried to use getAsString like the following but the server tells me that
the attribute does not exists, but when I use it outside the insertAttribute
it displays the name.

<t:insertAttribute name="tiles.page">
  <t:putAttribute name="tilesSiteName">
    <t:getAsString name="site.name" />

I also tried to use a ViewPreparer but I cannot access the page context in

Any ideas?

thx a lot,
View this message in context: http://www.nabble.com/Dynamic-attribute-value-tp16558224p16558224.html
Sent from the tiles users mailing list archive at Nabble.com.

View raw message