You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Josh Kamau <jo...@gmail.com> on 2010/11/08 06:44:20 UTC

Reusable markup components

Hi

I have been successful in creating reusable markup segments by creating them
as components. Is this the best way? are there other ways? i have seen a
class named Block and markup tag  <t:container> where are they used or are
they from older versions of tapestry?

Kind regards.

Re: Reusable markup components

Posted by Josh Kamau <jo...@gmail.com>.
Thanks Thiago.



On Mon, Nov 8, 2010 at 5:22 AM, Thiago H. de Paula Figueiredo <
thiagohp@gmail.com> wrote:

> On Mon, 08 Nov 2010 03:44:20 -0200, Josh Kamau <jo...@gmail.com>
> wrote:
>
>  Hi
>>
>
> Hi!
>
>  I have been successful in creating reusable markup segments by creating
>> them as components. Is this the best way?
>>
>
> Yes.
>
>
>  are there other ways? i have seen a
>> class named Block and markup tag  <t:container> where are they used or are
>> they from older versions of tapestry?
>>
>
> This is all explained here:
> http://tapestry.apache.org/tapestry5.1/guide/templates.html. Summary:
> block is named portion of template in a given page or component template. It
> is meant to be reused only inside a template, to be used as a parameter for
> a component or being used to provide edition or viewing blocks for
> GridModel-based components (BeanEditForm, BeanEditor, Grid, BeanDisplay).
>
> Tapestry templates must be well-formed XML, so they need to have a single
> root. <t:container> is only used as the root element in templates which
> otherwise would have more than one.
>
> --
> 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: Reusable markup components

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
On Mon, 08 Nov 2010 03:44:20 -0200, Josh Kamau <jo...@gmail.com>  
wrote:

> Hi

Hi!

> I have been successful in creating reusable markup segments by creating  
> them as components. Is this the best way?

Yes.

> are there other ways? i have seen a
> class named Block and markup tag  <t:container> where are they used or  
> are they from older versions of tapestry?

This is all explained here:  
http://tapestry.apache.org/tapestry5.1/guide/templates.html. Summary:  
block is named portion of template in a given page or component template.  
It is meant to be reused only inside a template, to be used as a parameter  
for a component or being used to provide edition or viewing blocks for  
GridModel-based components (BeanEditForm, BeanEditor, Grid, BeanDisplay).

Tapestry templates must be well-formed XML, so they need to have a single  
root. <t:container> is only used as the root element in templates which  
otherwise would have more than one.

-- 
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