You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Peter Stavrinides <ps...@intern.albourne.com> on 2007/07/20 07:17:52 UTC

T5 Border Component

Will the border component be re-introduced in Tapestry 5, if not how can I achieve a similar effect?

Re: T5 Border Component

Posted by Howard Lewis Ship <hl...@gmail.com>.
There was no Border component in T4; Border was a design pattern, not
a specific component.  For T5 we're calling it Layout (a name which, I
believe, better captures the functionality of the design), but it is
still as design pattern, not a specific component.

As the other responses have indicated, it is as easy (or easier) to
create a layout component in T5 as compared to T4.

On 7/19/07, Peter Stavrinides <ps...@intern.albourne.com> wrote:
> Will the border component be re-introduced in Tapestry 5, if not how can I achieve a similar effect?


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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


Re: T5 Border Component

Posted by Jordan Howarth <jo...@yahoo.com.au>.
Hi Peter

I was not aware of a core border component in T4 although I am happy to
be corrected.

Regardless, in T5 you have the <t:body/> Tapestry Element which, as
described in the documentation
(http://tapestry.apache.org/tapestry5/tapestry-core/guide/templates.html),
is an analogue of @RenderBody from T4.

The example in the documentation shows the layout component operating as
the root node of the containing page which is fine if you are a
minimalist. However if you appreciate being able to validate the html of
your page templates, you can finds examples of a "Border" component
being declared in the  <html> node of page templates, e.g. the testing
source code (v5.0.5). In this case, the "Border" component behaves in a
way that is similar to what occurred under T4 when the body element of a
containing page template was marked with jwcid="$content$".

J.

Peter Stavrinides wrote:
> Will the border component be re-introduced in Tapestry 5, if not how can I achieve a similar effect?
>   

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


Re: T5 Border Component

Posted by Daniel Jue <te...@gmail.com>.
Hi, the "border" component may not exist, but now you can use any
component as the "wrapper" or border for another page.  Also, you can
have borders around your components too!

In the first line of the html where you have your html and xsd
declaration, try this:

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
</html>

becomes

<t:mybordercomponent
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
</t:mybordercomponent>

Then in your mybordercomponent template you need a <t:body /> tag

There are plenty of examples out there, and most of them call their
border component "layout"

i.e.
<t:layout ....



On 7/20/07, Peter Stavrinides <ps...@intern.albourne.com> wrote:
> Will the border component be re-introduced in Tapestry 5, if not how can I achieve a similar effect?

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