I can't seem to set the layout for a screen class, and after reading the
archives, reading turbine source code and much testing I can't figure out
what I need to do to make it work.

I have a class SecureScreen that is a subclass of VelocitySecureScreen. I am
using this class as my base class for all my screen classes (it just
overrides the isAuthorised method), including Default.java. I find that when
I display a screen using the template name (eg.
http://host/app/servlet/app/template/MyScreen.vm) the default layout
(default.vm) is found and it all works fine.

But if I try to view a screen using the screen class name (eg.
http://host/app/servlet/app/screen/MyScreen) it does not find/use the
default layout I have created (templates/app/layouts/Default.vm) Instead, I
just get some kind of layout that has "Turbine - A Servlet Framework for
building Secure Dynamic Websites" in dark green text as a header and footer
above and below the unformatted screen text, with a logout button. Even if I
try to force it to find the proper default template, it still doesn't seem
to work. In the interests of experimentaiton, I tried:


* adding $data.setLayoutTemplate("/Default.vm") to MyScreen.vm

* adding the line "data.setLayoutTemplate( "/Default.vm" );" to the method
MyScreen.doBuildTemplate.

* overriding the getTemplate method in MyScreen to return "/Default.vm".

* tried creating a layout in the layout directory called "MyScreen.vm".


None of these had any effect, and I'm left scratching my head wondering
exactly what is going on here - can anyone kindly enlighten me as to what I
have missed?

Thanks,

Rob


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

Reply via email to