on 12/11/2000 6:24 AM, "Magnus ?or Torfason" <[EMAIL PROTECTED]> wrote:
> Ok, I'll consider ECS in screen building deprecated. The reason I asked is
> that I want to move on to templates without rendering my whole app unusable
> while I convert each screen.
>
> Luckily I found out how to solve it. I just had to make sure that the
> value of template.homepage is null. Then screen.homepage will be called.
>
> I have some other questions, that may very well stem from my limited
> understanding of Velocity (I did read what I found on the jakarta Velocity
> page, but my problems relate more to Velocity interaction with a Turbine
> framework)
>
> 1) I would have wanted to specify both which template to use,
> AND which screen to use, in the URL. There are rules to
> determine the screen from the template URL, but I feel that
> I need more customization. The screen variable is ignored
> however why is that. (Feel free to tell me that it is my
> itch, and I might very well scratch it. What I am wondering
> about is if the designers specifically decided to disallow
> that)
They are tied together for a purpose. The "screen" variable is actually
VelocitySiteScreen which does the job of searching for the appropriate
template and matching .java class.
Therefore,
http://www.foo.com/servlet/Turbine/template/Foo.vm
Turns into ->
http://www.foo.com/servlet/Turbine/screen/VelocitySiteScreen/template/Foo.vm
and then VelocitySiteScreen will load and execute
Foo.java and will then use the Context built up in Foo.java with by parsing
and executing Foo.vm with the Velocity engine.
If Foo.java is not present (which is perfectly fine), VelocitySiteScreen
will look for Default.java to execute. That class can also be missing as
well.
> 2) Why is Screen.getLayout() not allowed to return an Exception?
> I am having some trouble handling all my cases, and would
> not want to resort to RuntimeExceptions.
I believe the reason is that you should ALWAYS return something there.
I also believe that this method should be deprecated as it isn't used any
longer in the template system.
-jon
--
Honk if you love peace and quiet.
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]