on 5/30/01 5:54 AM, "Gabriel Moreno" <[EMAIL PROTECTED]> wrote:

> Jon Stevens wrote:
>> 
>> on 5/29/01 10:57 AM, "Gabriel Moreno" <[EMAIL PROTECTED]> wrote:
>> 
>>> Hi,
>>> I'm not sure when to use data.setScreen and when to use
>>> data.setScreenTemplate.
>> 
>> Well, one points to the Screen and one points to the Template.
>> 
> So, let me check if I understand right. setScreenTemplate should be used
> inside a Screen class in order to select the template to be used.
> setScreen should be used to activate a completely different screen (both
> class and template), for instance, within an Action class. Am I right?

Yup.

> 
>>> I'm using setScreenTemplate to redirect to other pages and that works.
>> 
>> Ok.
>> 
>>> But if I try to redirect to Error.vm after catching an exception, I have
>>> to use setScreen, other wise it doesn't work.
>>> Could someone explain me the difference?
>> 
>> The "right way" is to re-display the original screen with the error. If you
>> show an Error.vm screen, that doesn't do anyone any good. Also, Error.vm is
>> "special" in the system in that it is used by default as a catch all in
>> Turbine.java for major errors (ie: Horrible Exceptions), so that may be why
>> things are not working the way that you want.
>> 
>>> In addition, is the parameter the name of the template or the class? I'm
>>> using "Error.vm".
>>> Thanks a lot,
>> 
>> What parameter?
>> 
> 
> The parameter to setScreen and setScreenTemplate.

SetScreen is the class and setScreenTemplate is the template.

-jon

-- 
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/ymtd/ymtd.html>


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

Reply via email to