You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Fabio Kreusch <fa...@gmail.com> on 2008/07/08 21:30:56 UTC
[T5] Layout and $remove$
Hello all,
I'm new to Tapestry 5, and I'm having some problems:
In T4, the Shell component creates the outer layout. When I insert a
shell component in my pages, it ignores the page <html><head> etc and only
renderizes
the <body>, and renderizes the shell <html><head>.
On T5, with the <t:layout>, it renders both, the layout <html><head> and
the page <html><head>.
How can I make it render only the layout <html><head>?
And how can I make so that it don't render something, like the $remove$
tag on T4?
The tutorials I found about T5 shows examples with layout this way:
On the layout page, it goes the shell:
<html>
<head>
etc
On the page, just the body content, like:
<t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
${hello}
</t:layout>
But if I do this way, when I open the page on a web browser it doesn't
recognize it
as a html page. I have tried adding a
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
It works for a preview, but when I run tapestry it throws this exception:
Failure parsing template context:Start.tml: The markup in the document
following the root element must be well-formed.
How are you doing to preview the pages?
Thanks.
--
Fabio Kreusch
fabiokr@gmail.com
Re: [T5] Layout and $remove$
Posted by Fabio Kreusch <fa...@gmail.com>.
Just one thing if anyone try this again:
I had to add a xmlns, otherway it doesn't uses the Border component:
t:type="Layout" xmlns:t="
> http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
Did it worked for you without the xmlns?
2008/7/9 Fabio Kreusch <fa...@gmail.com>:
> Thanks, that's what I needed!
>
> 2008/7/8 Onno Scheffers <on...@piraya.nl>:
>
> Hi Fabio,
>>
>> it looks like you're looking for the same thing I was looking for a while
>> ago.
>>
>> http://www.nabble.com/Re-%3A-Re-%3A-T5%3A-Layout-question-tc16448904.html#a16448904
>>
>> Look for Peters' responses in that Thread. He really helped me out.
>>
>> regards,
>>
>> Onno Scheffers
>>
>>
>>
>> 2008/7/8 Fabio Kreusch <fa...@gmail.com>:
>>
>> > Hello all,
>> >
>> > I'm new to Tapestry 5, and I'm having some problems:
>> >
>> > In T4, the Shell component creates the outer layout. When I insert a
>> > shell component in my pages, it ignores the page <html><head> etc and
>> only
>> > renderizes
>> > the <body>, and renderizes the shell <html><head>.
>> >
>> > On T5, with the <t:layout>, it renders both, the layout <html><head>
>> and
>> > the page <html><head>.
>> > How can I make it render only the layout <html><head>?
>> >
>> > And how can I make so that it don't render something, like the
>> $remove$
>> > tag on T4?
>> >
>> > The tutorials I found about T5 shows examples with layout this way:
>> >
>> > On the layout page, it goes the shell:
>> >
>> > <html>
>> > <head>
>> > etc
>> >
>> > On the page, just the body content, like:
>> >
>> > <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
>> ">
>> > ${hello}
>> > </t:layout>
>> >
>> > But if I do this way, when I open the page on a web browser it doesn't
>> > recognize it
>> > as a html page. I have tried adding a
>> >
>> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>> >
>> > It works for a preview, but when I run tapestry it throws this
>> exception:
>> > Failure parsing template context:Start.tml: The markup in the document
>> > following the root element must be well-formed.
>> >
>> > How are you doing to preview the pages?
>> >
>> > Thanks.
>> >
>> >
>> > --
>> > Fabio Kreusch
>> > fabiokr@gmail.com
>> >
>>
>
>
>
> --
> Fabio Kreusch
> fabiokr@gmail.com
>
--
Fabio Kreusch
fabiokr@gmail.com
Re: [T5] Layout and $remove$
Posted by Fabio Kreusch <fa...@gmail.com>.
Thanks, that's what I needed!
2008/7/8 Onno Scheffers <on...@piraya.nl>:
> Hi Fabio,
>
> it looks like you're looking for the same thing I was looking for a while
> ago.
>
> http://www.nabble.com/Re-%3A-Re-%3A-T5%3A-Layout-question-tc16448904.html#a16448904
>
> Look for Peters' responses in that Thread. He really helped me out.
>
> regards,
>
> Onno Scheffers
>
>
>
> 2008/7/8 Fabio Kreusch <fa...@gmail.com>:
>
> > Hello all,
> >
> > I'm new to Tapestry 5, and I'm having some problems:
> >
> > In T4, the Shell component creates the outer layout. When I insert a
> > shell component in my pages, it ignores the page <html><head> etc and
> only
> > renderizes
> > the <body>, and renderizes the shell <html><head>.
> >
> > On T5, with the <t:layout>, it renders both, the layout <html><head>
> and
> > the page <html><head>.
> > How can I make it render only the layout <html><head>?
> >
> > And how can I make so that it don't render something, like the
> $remove$
> > tag on T4?
> >
> > The tutorials I found about T5 shows examples with layout this way:
> >
> > On the layout page, it goes the shell:
> >
> > <html>
> > <head>
> > etc
> >
> > On the page, just the body content, like:
> >
> > <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd
> ">
> > ${hello}
> > </t:layout>
> >
> > But if I do this way, when I open the page on a web browser it doesn't
> > recognize it
> > as a html page. I have tried adding a
> >
> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
> >
> > It works for a preview, but when I run tapestry it throws this exception:
> > Failure parsing template context:Start.tml: The markup in the document
> > following the root element must be well-formed.
> >
> > How are you doing to preview the pages?
> >
> > Thanks.
> >
> >
> > --
> > Fabio Kreusch
> > fabiokr@gmail.com
> >
>
--
Fabio Kreusch
fabiokr@gmail.com
Re: [T5] Layout and $remove$
Posted by Onno Scheffers <on...@piraya.nl>.
Hi Fabio,
it looks like you're looking for the same thing I was looking for a while
ago.
http://www.nabble.com/Re-%3A-Re-%3A-T5%3A-Layout-question-tc16448904.html#a16448904
Look for Peters' responses in that Thread. He really helped me out.
regards,
Onno Scheffers
2008/7/8 Fabio Kreusch <fa...@gmail.com>:
> Hello all,
>
> I'm new to Tapestry 5, and I'm having some problems:
>
> In T4, the Shell component creates the outer layout. When I insert a
> shell component in my pages, it ignores the page <html><head> etc and only
> renderizes
> the <body>, and renderizes the shell <html><head>.
>
> On T5, with the <t:layout>, it renders both, the layout <html><head> and
> the page <html><head>.
> How can I make it render only the layout <html><head>?
>
> And how can I make so that it don't render something, like the $remove$
> tag on T4?
>
> The tutorials I found about T5 shows examples with layout this way:
>
> On the layout page, it goes the shell:
>
> <html>
> <head>
> etc
>
> On the page, just the body content, like:
>
> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> ${hello}
> </t:layout>
>
> But if I do this way, when I open the page on a web browser it doesn't
> recognize it
> as a html page. I have tried adding a
>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>
> It works for a preview, but when I run tapestry it throws this exception:
> Failure parsing template context:Start.tml: The markup in the document
> following the root element must be well-formed.
>
> How are you doing to preview the pages?
>
> Thanks.
>
>
> --
> Fabio Kreusch
> fabiokr@gmail.com
>
Re: [T5] Layout and $remove$
Posted by Shing Hing Man <ma...@yahoo.com>.
To preview, I use something like the following.
<html t:type="layout" xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<head t:type="remove">
<link rel="stylesheet" href="../css/main.css" type="text/css"/>
</head>
<body>
Hello!
</body>
</html>
----------------
I use a simple remove component ,with no template, to remove the header tag.
public class Remove {
protected boolean beginRender(){
return false;
}
}
Shing
Home page : http://www.lombok.demon.co.uk/
--- On Wed, 9/7/08, Fabio Kreusch <fa...@gmail.com> wrote:
> From: Fabio Kreusch <fa...@gmail.com>
> Subject: [T5] Layout and $remove$
> To: "Tapestry users" <us...@tapestry.apache.org>
> Date: Wednesday, 9 July, 2008, 3:30 AM
> Hello all,
>
> I'm new to Tapestry 5, and I'm having some
> problems:
>
> In T4, the Shell component creates the outer layout. When I
> insert a
> shell component in my pages, it ignores the page
> <html><head> etc and only
> renderizes
> the <body>, and renderizes the shell
> <html><head>.
>
> On T5, with the <t:layout>, it renders both, the
> layout <html><head> and
> the page <html><head>.
> How can I make it render only the layout
> <html><head>?
>
> And how can I make so that it don't render
> something, like the $remove$
> tag on T4?
>
> The tutorials I found about T5 shows examples with layout
> this way:
>
> On the layout page, it goes the shell:
>
> <html>
> <head>
> etc
>
> On the page, just the body content, like:
>
> <t:layout
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> ${hello}
> </t:layout>
>
> But if I do this way, when I open the page on a web browser
> it doesn't
> recognize it
> as a html page. I have tried adding a
>
> <meta http-equiv="Content-Type"
> content="text/html; charset=UTF-8"/>
>
> It works for a preview, but when I run tapestry it throws
> this exception:
> Failure parsing template context:Start.tml: The markup in
> the document
> following the root element must be well-formed.
>
> How are you doing to preview the pages?
>
> Thanks.
>
>
> --
> Fabio Kreusch
> fabiokr@gmail.com
__________________________________________________________
Not happy with your email address?.
Get the one you really want - millions of new email addresses available now at Yahoo! http://uk.docs.yahoo.com/ymail/new.html
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org