Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Thu, 08 Jul 2010 10:38:51 -0300, matt22 <s1...@zoznam.sk> wrote:
> hmmm, yes...
> But I want to insert components dynamically, in class:
>
> TML:
> <t:delegate to="listOfComponents" ...
>
> JAVA:
> ...
> Block getListOfComponents(){
> //here i must create block with some elements...
> }
>
> How to do it?
Two suggestions:
1) Implement a RenderCommand that adds the Blocks to the RenderQueue and
return it in getListOfComponents(). You'll need to cast the blocks to
RenderCommand.
2) Implement a component that receives the blocks to be rendered. It's
beginRender() method will return the current block (Tapestry will render
it) and your afterRender() method will return false if not all blocks were
rendered yet.
As Kristian said, you can't instantiate components yourself, but you can
render them dinamically.
--
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
Re: Multiple Components in
Posted by matt22 <s1...@zoznam.sk>.
hmmm, yes...
But I want to insert components dynamically, in class:
TML:
<t:delegate to="listOfComponents" ...
JAVA:
...
Block getListOfComponents(){
//here i must create block with some elements...
}
How to do it?
kristian.marinkovic wrote:
>
> correct... create a block with multiple coponents
>
> g,
> kris
>
>
>
> Von: matt22 <s1...@zoznam.sk>
> An: users@tapestry.apache.org
> Datum: 08.07.2010 07:15
> Betreff: Multiple Components in <t:delegate ...
>
>
>
>
> Hi,
> Is it possible to render list of component in delegate?
> <t:delegate to="list of components" ...
>
> or create new block and add component to the new block(and render the
> block
> in delegate)?
>
> thanks
> --
> View this message in context:
> http://old.nabble.com/Multiple-Components-in-%3Ct%3Adelegate-...-tp29100029p29100029.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
>
>
>
>
--
View this message in context: http://old.nabble.com/Multiple-Components-in-%3Ct%3Adelegate-...-tp29100029p29107138.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: Multiple Components in
Posted by Kristian Marinkovic <kr...@porsche.co.at>.
correct... create a block with multiple coponents
g,
kris
Von: matt22 <s1...@zoznam.sk>
An: users@tapestry.apache.org
Datum: 08.07.2010 07:15
Betreff: Multiple Components in <t:delegate ...
Hi,
Is it possible to render list of component in delegate?
<t:delegate to="list of components" ...
or create new block and add component to the new block(and render the
block
in delegate)?
thanks
--
View this message in context:
http://old.nabble.com/Multiple-Components-in-%3Ct%3Adelegate-...-tp29100029p29100029.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