I personally like the fact that most actions do not have to deal with UI
validations, and that it is nicely seperated. I think the grey area is when you
may be required to do business validations for UI fields, in which you might
want to do use components - for example, lets say you want to validate a zip
code exists against a database of USPS zip codes.
Under this circumstance I think an additional interface with a validate() method
is cleaner than placing the validation logic in the execute() method - which I
think should only be for business logic. I would also think that this
interceptor could handle both interface easily.
/Ian
--
>From Down & Around, Inc.
Innovative IT solutions
Software Architecture * Design * Development
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
web: www.fdar.com
email: [EMAIL PROTECTED]
phone: 617.821.5430
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> What lifecycle? It's already there. All it does is this:
>
> Action action = invocation.getAction();
>
> if (action instanceof ValidationAware) {
> ValidationAware validationAwareAction = (ValidationAware)
> action;
>
> if (validationAwareAction.hasErrors()) {
> return Action.INPUT;
> }
> }
>
> return invocation.invoke();
>
> As far as calling a validate() method, or whatnot, if people see value
> in that, we can add it as an Interface and either have a separate
> Interceptor for it or add it to this one. In general, I was planning on
> doing validations using the validation framework and anything else would
> be done in the execute() method. What do others think?
>
> > -----Original Message-----
> > From: Pat Lightbody [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 28, 2003 11:24 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: [OS-webwork] Validation Framework doubt
> >
> >
> > Jason,
> > One request -- when you move the logic in to an
> > interceptor... can you use a Lifecycle interface rather than
> > reflection?
> >
> > -Pat
> > >
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork