You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by iberck <ib...@gmail.com> on 2012/05/24 01:35:49 UTC
T5 How can I pass a block to a component?
I need a component "component1" that receives a block, for example:
<t:component1>
<p:block1>
block1's body
</p:block1>
</t:component1>
How can I define the component1 to receive the "block1" block?
Thanks in advance
--
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-How-can-I-pass-a-block-to-a-component-tp5713371.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5 How can I pass a block to a component?
Posted by Steve Eynon <st...@alienfactory.co.uk>.
In Test.tml you could also do:
<t:component1 block1="block:dude" />
<t:block t:id="dude>
texto bloque uno
</t:block>
Steve.
--
Steve Eynon
-------------------------------
"If at first you don't succeed,
so much for skydiving!"
On 24 May 2012 07:43, iberck <ib...@gmail.com> wrote:
> I found the solution:
>
>
> .tml:
> public class Component1 {
>
> @Parameter
> @Property
> private Block block1;
> }
>
> .java:
> contenido bloque: <t:delegate to="block1"/>
>
> Test.tml:
> <t:component1>
> <p:block1>
> texto bloque uno
> </p:block1>
> </t:component1>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/T5-How-can-I-pass-a-block-to-a-component-tp5713371p5713372.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5 How can I pass a block to a component?
Posted by iberck <ib...@gmail.com>.
I found the solution:
.tml:
public class Component1 {
@Parameter
@Property
private Block block1;
}
.java:
contenido bloque: <t:delegate to="block1"/>
Test.tml:
<t:component1>
<p:block1>
texto bloque uno
</p:block1>
</t:component1>
--
View this message in context: http://tapestry.1045711.n5.nabble.com/T5-How-can-I-pass-a-block-to-a-component-tp5713371p5713372.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org