You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Julien Martin <ba...@gmail.com> on 2012/01/31 17:30:14 UTC

Question regarding the t:delegate tag in the context of t:checklist component

Hello,

I noticed that a t:delegate is used in order to render the individual
checkboxes of the t:checklist component.

See below:
<t:container xmlns:t="http://tapestry.apache.org/schema/tapestry_5_3.xsd">
    <div t:type="loop" source="availableOptions" value="var:currentOption"
class="t-checklist-row">
          * <t:delegate to="var:currentOption"/>*
    </div>
</t:container>

Can anyone please briefly explain the logic behind this? How can a simple
t:delegate tag render a full-fledged checkbox?

Regards,

Julien.

Re: Question regarding the t:delegate tag in the context of t:checklist component

Posted by Julien Martin <ba...@gmail.com>.
Hi Thiago,
I understand better now.
Thanks,
J.

2012/1/31 Thiago H. de Paula Figueiredo <th...@gmail.com>

> On Tue, 31 Jan 2012 14:30:14 -0200, Julien Martin <ba...@gmail.com>
> wrote:
>
>  Hello,
>>
>
> Hi!
>
> There's no t:delegate tag: there's a Delegate component. Any component
> instance can be declared using the <t:xxx> or <anyTag t:type="xxx"> (which
> is my favorite one).
>
>  I noticed that a t:delegate is used in order to render the individual
>> checkboxes of the t:checklist component.
>> Can anyone please briefly explain the logic behind this?
>>
>
> I can't look at the source now, so I can't answer this.
>
>
>  How can a simple t:delegate tag render a full-fledged checkbox?
>>
>
> From the Delegate's "to" parameter JavaDoc: "The object which will be
> rendered in place of the Delegate component. This is typically a specific
> component
> instance, or a {@link Block}."
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>

Re: Question regarding the t:delegate tag in the context of t:checklist component

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Tue, 31 Jan 2012 14:30:14 -0200, Julien Martin <ba...@gmail.com> wrote:

> Hello,

Hi!

There's no t:delegate tag: there's a Delegate component. Any component  
instance can be declared using the <t:xxx> or <anyTag t:type="xxx"> (which  
is my favorite one).

> I noticed that a t:delegate is used in order to render the individual
> checkboxes of the t:checklist component.
> Can anyone please briefly explain the logic behind this?

I can't look at the source now, so I can't answer this.

> How can a simple t:delegate tag render a full-fledged checkbox?

 From the Delegate's "to" parameter JavaDoc: "The object which will be  
rendered in place of the Delegate component. This is typically a specific  
component
instance, or a {@link Block}."

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org