You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Walid Iguer <wi...@adyoursight.com> on 2008/10/07 14:28:58 UTC

type of Component

Hi,

I'm looking for a way to dynamically implement a "type" of Component.

Do you have a solution?

Currently, I do this: (the method does not like me)

   ...
  <t:if test="useComponent1">
       <div t:type="myComponent1">
   </t:if>

   <t:if test="useComponent2">
       <div t:type="myComponent2">
   </t:if>
   <t:if test="useComponent3">
       <div t:type="myComponent3">
   </t:if>
   ....


Thanks,

Wig

Re: type of Component

Posted by Toby Hobson <to...@googlemail.com>.
What errors do you see?

2008/10/7 Walid Iguer <wi...@adyoursight.com>

> Hi,
>
> I'm looking for a way to dynamically implement a "type" of Component.
>
> Do you have a solution?
>
> Currently, I do this: (the method does not like me)
>
>   ...
>  <t:if test="useComponent1">
>       <div t:type="myComponent1">
>   </t:if>
>
>   <t:if test="useComponent2">
>       <div t:type="myComponent2">
>   </t:if>
>   <t:if test="useComponent3">
>       <div t:type="myComponent3">
>   </t:if>
>   ....
>
>
> Thanks,
>
> Wig
>

Re: type of Component

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Tue, 07 Oct 2008 09:54:34 -0300, Walid Iguer <wi...@adyoursight.com>  
escreveu:

> Delegate Component does not suit for me. This requires me to write any
> blocks on my page

It can use blocks from other pages too.

> I would like the type to be implemented dynamically.
>
> For example:
>
> <div t:type="${myComponent}">

Tapestry does not allow you to do that.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
Consultor, desenvolvedor e instrutor em Java
http://www.arsmachina.com.br/thiago

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


Re: type of Component

Posted by Walid Iguer <wi...@adyoursight.com>.
Delegate Component does not suit for me. This requires me to write any
blocks on my page

I would like the type to be implemented dynamically.

For example:

<div t:type="${myComponent}">

Thanks


2008/10/7 Thiago H. de Paula Figueiredo <th...@gmail.com>

> Em Tue, 07 Oct 2008 09:28:58 -0300, Walid Iguer <wi...@adyoursight.com>
> escreveu:
>
>  Hi,
>>
>> I'm looking for a way to dynamically implement a "type" of Component.
>>
>> Do you have a solution?
>>
>
> Use blocks and the Delegate component:
> http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Delegate.html
> .
>
> --
> Thiago H. de Paula Figueiredo
> Independent Java consultant, developer, and instructor
> Consultor, desenvolvedor e instrutor em Java
> http://www.arsmachina.com.br/thiago
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: type of Component

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Em Tue, 07 Oct 2008 09:28:58 -0300, Walid Iguer <wi...@adyoursight.com>  
escreveu:

> Hi,
>
> I'm looking for a way to dynamically implement a "type" of Component.
>
> Do you have a solution?

Use blocks and the Delegate component:  
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry5/corelib/components/Delegate.html.

-- 
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
Consultor, desenvolvedor e instrutor em Java
http://www.arsmachina.com.br/thiago

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