The Default.java doBuildTemplate() won't be handling any exceptions, since
all it does is put the PullTool into the context. Is there a way to handle
this in doPostBuildTemplate()? It doesn't seem like it.
The exception will happen while the template is being rendered by
buildTemplate() and the PullTool methods are being called. One technique
would be to have the PullTool handle the exceptions and then return some
sort of error code to the template, such as a null value instead of a
Vector. Unfortunately this doesn't allow for the detailed information that
an exception can return. There is also the issue of redirecting the user to
an appropriate screen to display the error, such as sending the user back to
the form screen and telling him that one of his fields is missing.
One could also override the functionality in Error.vm and make it redirect
the user to the correct page and display the error information from the
exception. Is this the way to go?
Have many of you tried the Pull MVC model in practice, and if so, how have
you dealt with these issues?
Thanks,
-Myron
> -----Original Message-----
> From: Jon Stevens [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 21, 2001 10:21 AM
> To: Turbine-user
> Subject: Re: Reasons For Action Classes
>
>
> on 6/21/01 3:12 AM, "Myron Ahn" <[EMAIL PROTECTED]> wrote:
>
> > Jon,
> >
> > I've read your document on the Pull MVC model and have been
> experimenting
> > with this method, and it is great in terms of breaking the dependency
> > between screens and classes.
> >
> > However there is one issue: error handling. Using the old method, if an
> > exception is thrown in a doBuildTemplate(), it is easy to catch and the
> > error handling code can direct the user to a particular screen
> to report the
> > error. Using the Pull MVC model, what do you do when your
> template.vm calls
> > your PullTool and it throws an exception?
> >
> > Thanks,
> > -Myron
>
> PullTool's should handle exceptions internally and you should
> still define a
> "Default.java" Screen which will get executed for every request...
>
> -jon
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]