You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stephane Decleire <sd...@cariboo-networks.com> on 2009/02/23 22:36:51 UTC
T5 : optional parameters in tml
I would like to know what's the "best" way to manage optional parameters
in the tml template ?
For example, if i have to write a tag like :
<div t:id="zipCodeField" t:type="TextField" value="zipcode"
validate="required" />
or
<div t:id="zipCodeField" t:type="TextField" value="zipcode" />
based on the value of a property.
In one hand, i would rather avoid <t:if> tags in the template but in the
other hand, something simple like validate="${myvalue}" won't work. So,
is there a simple way to do this ?
Thanks in advance.
Stephane
Re: T5 : optional parameters in tml
Posted by Stephane Decleire <sd...@cariboo-networks.com>.
I've found that the "inherit:" parameter binding makes quite a good job
in this case !
Stephane
Stephane Decleire a écrit :
> I would like to know what's the "best" way to manage optional parameters
> in the tml template ?
>
> For example, if i have to write a tag like :
> <div t:id="zipCodeField" t:type="TextField" value="zipcode"
> validate="required" />
> or
> <div t:id="zipCodeField" t:type="TextField" value="zipcode" />
> based on the value of a property.
>
> In one hand, i would rather avoid <t:if> tags in the template but in the
> other hand, something simple like validate="${myvalue}" won't work. So,
> is there a simple way to do this ?
>
> Thanks in advance.
>
> Stephane
>
>