Colm McCartan wrote:
> 
> Hello all,
> 
> I've just built the newapp and started adapting it - first comment is that this
> a great, highly usable framework and an impressive amount of work and
> documentation has gone into it - many thanks. Question:
> 
> My problem is that when I try to debug why I'm not going to the correct
> template, the logs show me that there is some odd activity going on even during
> normal operation - I notice that this happens with the newapp also. In all cases
> the site is behaving as expected  i.e. finding the screen required - its just
> that when I try to debug something that *is* broken I don't know why the log has
> these errors... see the snip below from the newapp velocity.log...
> 
> Why is the template looked for in /layouts, reported as missing and then
> eventually found in /screens? My templates are in the
> WEBAPP/templates/app/screens folder as per the documentation.

Layout templates are searched for because every screen template has
a corresponding layout template. Read the FSD:

http://jakarta.apache.org/turbine/fsd.html

If you want to learn about the relationship between layouts and screens.
And read the Velocity site howto to find out how templates are searched
for. There is a search order for templates so you may see some failed
attempts in your logs for various layout templates.

http://jakarta.apache.org/turbine/howto/velocity-site-howto.html

> 
> I suspect I have a faulty understanding of the interaction between layouts and
> screens - I'm using data.setScreenLayout to set the destination screens...

You are setting the layout here which is not what you want. Were
you trying to set the layout or the screen? Did you look at
the TDK sample app?

You no longer need to use any manual setting of layouts. Just use

data.setScreenTemplate(template)

and the corresponding layout template will be found for you.
 
> Any help appreciated and apologies to anyone who saw this query first (and
> inappropriately) posted to velocity-users...
> colm
> 
> ---------- snip from velocity.log -------------------------------
> Mon May 28 12:11:33 GMT+01:00 2001  [error] ResourceManager : unable to find
> resource 'layouts/user/Default.vm' in any resource loader.
> Mon May 28 12:11:33 GMT+01:00 2001   [info] ResourceManager : found
> layouts/Default.vm with loader
> org.apache.velocity.runtime.resource.loader.FileResourceLoader
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://jakarta.apache.org/commons
http://tambora.zenplex.org

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

Reply via email to