Hi,

the answer to this question is both simple and complicated:

The simple answer: The method name is wrong. setScreenTemplate()
_should_ have been called setPageTemplate().

The complicated answer:

When you call setScreenTemplate("foo,bar,Baz.vm"), you instruct
Turbine to use the foo,bar,Baz.vm page as the next output page. This
page consists of the Layout, the Screen and optional Navigation. The
matching templates for this are found using the Mappers from the
Template Service.

Normally, if you request a new Page, Turbine will find a Screen to
match it which is 99% of the time the same name as the Page and thus
found in /templates/screens/foo/bar/Baz.vm and a Layout. If you didn't
do anything special, Turbine will end up with /templates/layouts/Default.vm

>From these templates, Turbine will build the page and send it to the
Browser.

        Regards
                Henning


"Migracion" <[EMAIL PROTECTED]> writes:



>-----Original Message-----
>From: John Harris [mailto:[EMAIL PROTECTED]
>Sent: Sabado, 23 de Octubre de 2004 03:29 p.m.
>To: [EMAIL PROTECTED]
>Subject: Question about $data.setScreenTemplate


>I'm calling $data.setScreenTemplate("NewPage.vm") - the logs show that
>it looks under layouts/NewPage.vm, when it doesn't find it, it looks and
>finds layouts/Default.vm and returns.

>I'm trying to understand why it would look for it under
>layouts/NewPage.vm - shouldn't it be looking for it under screens? What
>am I missing here? I've been reading all the services/how-to to get an
>indication of how this would work but I don't see it.

>I have tested doing $data.setLayoutTemplate("NewLayout.vm") followed by
>$data.setScreenTemplate("NewPage.vm") - it does load the
>layouts/NewLayout.vm - but it still looks for NewPage.vm under layouts.

>Any help or explanation would be greatly appreciated. I'm using turbine
>2.3.

>-John


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



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

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
[EMAIL PROTECTED]        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

"Fighting for one's political stand is an honorable action, but re-
 fusing to acknowledge that there might be weaknesses in one's
 position - in order to identify them so that they can be remedied -
 is a large enough problem with the Open Source movement that it
 deserves to be on this list of the top five problems."
                       -- Michelle Levesque, "Fundamental Issues with
                                    Open Source Software Development"

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

Reply via email to