You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tiles.apache.org by "De Bakker, Bjorn" <Bj...@ordina.be> on 2009/03/09 13:40:09 UTC
Passing value to "subpage"
Hi guys
I want to do something in my application, but I don't know whether it's possible or not. We have a template definition and a page definition which extends the template definition.
In that template definition, there's a list of pages which are added by the put-list-attribute. Is it possible to pass a value to a page in that list?
For instance:
<add-attribute value="/.../test.jsp">
<put-attribute name="attribute" value="Testing" />
</add-attribute>
Is it possible to do something like this, or a workaround?
Thanks
Re: Passing value to "subpage"
Posted by Antonio Petrelli <an...@gmail.com>.
2009/3/9 De Bakker, Bjorn <Bj...@ordina.be>:
> I want to do something in my application, but I don't know whether it's possible or not. We have a template definition and a page definition which extends the template definition.
>
> In that template definition, there's a list of pages which are added by the put-list-attribute. Is it possible to pass a value to a page in that list?
>
> For instance:
>
> <add-attribute value="/.../test.jsp">
> <put-attribute name="attribute" value="Testing" />
> </add-attribute>
Yes but a slightly different syntax, you can use a nested anonymous
definition (Tiles 2.1.x only):
http://tiles.apache.org/framework/tutorial/advanced/nesting-extending.html#Anonymous_nested_definitions
In other words:
<add-attribute>
<definition template="/.../test.jsp">
<put-attribute name="attribute" value="Testing" />
</definition>
</add-attribute>
HTH
Antonio