Magnus ?or Torfason wrote:
>
> > > Is there any setting to determine
> > > if ECS or Velocity should be used when nothing is passed in the URL?
> > >
> > > Magnus
> >
> > If you want to use them together, you are probably going to have to figure
> > out how to make it work yourself as using ECS for screens is very
> > deprecated.
> >
> > -jon
> >
>
> 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)
>
In general it would not be a good idea to allow the java class to be
used with a template to be decided by the user (invitation to url
hacking to get around security), so the inability to do so has been
designed in by default. It is easy to get around for a java Screen that
can work with several templates. Just use the screen parameter key to
get the java Screen and then in the Screen use some other query
parameter other than "template" to get the template name. Or if you
really want to override this behavior generally I think you would want
to use your own TemplateSessionValidator that does not remove the
"screen" parameter if the "template" parameter exists.
> 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.
You can easily catch Exception and either return null or the default
Layout defined in TR.props.
John McNally
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]