You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michal Hlavac <hl...@hlavki.eu> on 2008/10/23 20:04:44 UTC

layout template doesn't work

Hello,

I created sample tapestry5 applicatoin from maven quickstart archetype...

Then I created Layout.tml and Layout.java
Layout.tml:
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
    <head>
        <title>My Tapestry Application</title>
    </head>
    <body>
        <t:body/>
    </body>
</html>


Layout.java:
public class Layout {
}

Index.tml:
<html t:type="layout" 
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
    <h1>tamsimple Start Page</h1>
    <p> This is the start page for this application, a good place to start 
your modifications.
    Just to prove this is live: </p>
    <p> The current time is: ${currentTime}. </p>
    <p>
        [<t:pagelink t:page="Index">refresh</t:pagelink>]
    </p>
</html>

Index.java:
public class Index {

    public Date getCurrentTime() {
        return new Date();
    }
}

Source from browser is:
<p>
[<a href="/tamsimple/">refresh</a>]
</p>


There is no <html> tag... It renders only last <p> element from Index.tml. I 
am using tapestry 5.0.15.

thanks, m.

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


Re: layout template doesn't work

Posted by Michal Hlavac <mi...@datalan.sk>.
Hello,
thanks for fast answer, but
tapestry.app-package is set to eu.hlavki.tamsample.

So Layout.tml is in eu/hlavki/tamsample/components folder. Is that wrong?

thanks, m.

On Thursday 23 October 2008 20:08:18 Howard Lewis Ship wrote:
> Your Layout.tml is likely in the wrong location.
>
> On Thu, Oct 23, 2008 at 11:04 AM, Michal Hlavac <hl...@hlavki.eu> wrote:
> > Hello,
> >
> > I created sample tapestry5 applicatoin from maven quickstart archetype...
> >
> > Then I created Layout.tml and Layout.java
> > Layout.tml:
> > <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> >    <head>
> >        <title>My Tapestry Application</title>
> >    </head>
> >    <body>
> >        <t:body/>
> >    </body>
> > </html>
> >
> >
> > Layout.java:
> > public class Layout {
> > }
> >
> > Index.tml:
> > <html t:type="layout"
> > xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> >    <h1>tamsimple Start Page</h1>
> >    <p> This is the start page for this application, a good place to start
> > your modifications.
> >    Just to prove this is live: </p>
> >    <p> The current time is: ${currentTime}. </p>
> >    <p>
> >        [<t:pagelink t:page="Index">refresh</t:pagelink>]
> >    </p>
> > </html>
> >
> > Index.java:
> > public class Index {
> >
> >    public Date getCurrentTime() {
> >        return new Date();
> >    }
> > }
> >
> > Source from browser is:
> > <p>
> > [<a href="/tamsimple/">refresh</a>]
> > </p>
> >
> >
> > There is no <html> tag... It renders only last <p> element from
> > Index.tml. I am using tapestry 5.0.15.
> >
> > thanks, m.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org



-- 
[ michal hlavac ][ michal_hlavac@datalan.sk ]
[ mob:+421 915 997439 ][ http://www.datalan.sk ]

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


Re: layout template doesn't work

Posted by Michal Hlavac <hl...@hlavki.eu>.
On Thursday 23 October 2008 20:08:18 Howard Lewis Ship wrote:
> Your Layout.tml is likely in the wrong location.

thanks,

you were right... I had template files in weapp folder instead of resoures.

thanks, m.

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


Re: layout template doesn't work

Posted by Howard Lewis Ship <hl...@gmail.com>.
Your Layout.tml is likely in the wrong location.

On Thu, Oct 23, 2008 at 11:04 AM, Michal Hlavac <hl...@hlavki.eu> wrote:
> Hello,
>
> I created sample tapestry5 applicatoin from maven quickstart archetype...
>
> Then I created Layout.tml and Layout.java
> Layout.tml:
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>    <head>
>        <title>My Tapestry Application</title>
>    </head>
>    <body>
>        <t:body/>
>    </body>
> </html>
>
>
> Layout.java:
> public class Layout {
> }
>
> Index.tml:
> <html t:type="layout"
> xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
>    <h1>tamsimple Start Page</h1>
>    <p> This is the start page for this application, a good place to start
> your modifications.
>    Just to prove this is live: </p>
>    <p> The current time is: ${currentTime}. </p>
>    <p>
>        [<t:pagelink t:page="Index">refresh</t:pagelink>]
>    </p>
> </html>
>
> Index.java:
> public class Index {
>
>    public Date getCurrentTime() {
>        return new Date();
>    }
> }
>
> Source from browser is:
> <p>
> [<a href="/tamsimple/">refresh</a>]
> </p>
>
>
> There is no <html> tag... It renders only last <p> element from Index.tml. I
> am using tapestry 5.0.15.
>
> thanks, m.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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