You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by #Cyrille37# <cy...@gmail.com> on 2007/07/26 13:25:34 UTC
[T4] variable in component specification
Hi,
What's the way to have something like a variable in component
specification ?
In those 2 components there is the same ognl expresion in the value
attribute.
<component id="comp1" type="Any">
<binding name="value"
value="ognl::'L'+currentList.id+'C'+currentCandidat.id" />
</component>
<component id="comp2" type="Any">
<binding name="value"
value="ognl:'L'+currentList.id+'C'+currentCandidat.id" />
</component>
How can I define this expresion only one time ?
Thanks
cyrille
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T4] variable in component specification
Posted by #Cyrille37# <cy...@gmail.com>.
Igor Drobiazko a écrit :
> Hi,
>
> use 'copy-of' attribute:
> <component id="comp2" copy-of="comp1"/>
>
> Using 'copy-of' it is also possible to override some of the bindings of the
> original component.
>
Thanks a lot Igor.
Cheers
Cyrille.
> Igor
>
> On 7/26/07, #Cyrille37# <cy...@gmail.com> wrote:
>
>> Hi,
>>
>> What's the way to have something like a variable in component
>> specification ?
>>
>> In those 2 components there is the same ognl expresion in the value
>> attribute.
>>
>> <component id="comp1" type="Any">
>> <binding name="value"
>> value="ognl::'L'+currentList.id+'C'+currentCandidat.id" />
>> </component>
>> <component id="comp2" type="Any">
>> <binding name="value"
>> value="ognl:'L'+currentList.id+'C'+currentCandidat.id" />
>> </component>
>>
>> How can I define this expresion only one time ?
>>
>> Thanks
>> cyrille
>>
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: [T4] variable in component specification
Posted by Igor Drobiazko <ig...@gmail.com>.
Hi,
use 'copy-of' attribute:
<component id="comp2" copy-of="comp1"/>
Using 'copy-of' it is also possible to override some of the bindings of the
original component.
Igor
On 7/26/07, #Cyrille37# <cy...@gmail.com> wrote:
>
> Hi,
>
> What's the way to have something like a variable in component
> specification ?
>
> In those 2 components there is the same ognl expresion in the value
> attribute.
>
> <component id="comp1" type="Any">
> <binding name="value"
> value="ognl::'L'+currentList.id+'C'+currentCandidat.id" />
> </component>
> <component id="comp2" type="Any">
> <binding name="value"
> value="ognl:'L'+currentList.id+'C'+currentCandidat.id" />
> </component>
>
> How can I define this expresion only one time ?
>
> Thanks
> cyrille
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>