Hi Juliane,

templates and classes for pages or components have to be in the same package. 
Secondly, pages (i.e. Start) must go to the pages subpackage whilst components 
(i.e. Layout) must go to the components subpackage. The resulting package 
structure for your example would be:
de.<yourdomain>.<yourappname>.pages.Start.java
de.<yourdomain>.<yourappname>.pages.Start.tml
de.<yourdomain>.<yourappname>.components.Layout.java
de.<yourdomain>.<yourappname>.components.Layout.tml

And another thing I am facing when creating new classes is that class reloading 
notices when I have changed an existing class but does not notice for some 
reason when I have added a new class. So maybe a restart of your context or 
even your servlet container after having added a new class might solve the 
problem.

Kind regards, nillehammer



----- original Nachricht --------

Betreff: T5: unable to resolve 'Layout' (see Article: Tapestry for 
Nonbelievers) 
Gesendet: Do, 15. Mai 2008
Von: [EMAIL PROTECTED]

> Hi,
> 
> I am a Java Programmer just starting to study Tapestry 5.
> I tried to follow the example in the article "Tapestry for Nonbelievers"
> where a Layout.tml is used to integrate page specific content.
> I keep getting a "java.lang.IllegalArgumentException: Unable to resolve
> 'Layout' to a component class name. "
> And I do not know why this is. (Probably something very easy and stupid,
> sorry - these are my first steps...)
> 
> My Code:
> 
> Start.java:
> =========
> public class Start{
>       
>       public Date getCurrentTime() { 
>               return new Date(); 
>       }
> }
> 
> Start.tml:
> ==========
> <t:Layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>         <p> The current time is: ${currentTime}. </p>
> </t:Layout>
> 
> 
> Layout.java:
> ===========
> @IncludeStylesheet("context:memory.css")
> public class Layout {
> 
> }
> 
> Layout.tml:
> =========
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>     <head>
>         <title>Fionas Memory</title>
>     </head>
>     <body>
>         <h1>Fionas Memory</h1>
>               <t:body/> <!-- here goes the content of Start.tml -->
>     </body>
> </html>
> ===================================
> 
> Has anybody an idea where to look for the error? Layout.java is empty: is
> that correct?
> thanks very much for your help,
> Juliane
> _______________________________________________________________________
> EINE FÜR ALLE: die kostenlose WEB.DE-Plattform für Freunde und Deine
> Homepage mit eigenem Namen. Jetzt starten! http://unddu.de/[EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

--- original Nachricht Ende ----


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to