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

Hi,

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" />
  ...
</definition>

in layout.jsp

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

How can I use the value of the definition in the putAttribute in the
layout.jsp?

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" />
  </t:putAttribute>
</t:insertAttribute>

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

Any ideas?

thx a lot,
Stefan
-- 
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.


Mime
View raw message