Well, this requires an interface - and how is default handled? Just don't
put an interceptor on the default alias, and then create a doDefault()? It
all seems so hacky and not neat. You then have 1 interceptor, 1 interface
and 2 methods in the class. Hodgepodgecode!

M

On 3/7/03 11:58 AM, "Jason Carreira" ([EMAIL PROTECTED]) penned the
words:

> 
> Here's the class. I'm assuming here that we'd create another Interceptor
> if we want it to call a validate() method on the Action... If you don't
> use this, you could just use the regular ValidationInterceptor.
> 
> public class DefaultWorkflowInterceptor implements Interceptor {
>   /**
>    * Called to let an interceptor clean up any resources it has
> allocated.
>    */
>   public void destroy() {
>   }
> 
>   /**
>    * Called after an Interceptor is created, but before any requests
> are processed using the intercept() methodName. This
>    * gives the Interceptor a chance to initialize any needed
> resources.
>    */
>   public void init() {
>   }
> 
>   /**
>    * Allows the Interceptor to do some processing on the request
> before and/or after the rest of the processing of the
>    * request by the DefaultActionInvocation or to short-circuit the
> processing and just return a String return code.
>    *
>    * @param invocation
>    * @return
>    * @throws Exception
>    */
>   public String intercept(ActionInvocation invocation) throws
> Exception {
>       Action action = invocation.getAction();
>       if (action instanceof ValidationAware) {
>           ValidationAware validationAwareAction =
> (ValidationAware)action;
>           if (validationAwareAction.hasErrors()) {
>               return Action.INPUT;
>           }
>       }
>       return invocation.invoke();
>   }
> }
> 
>> -----Original Message-----
>> From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]
>> Sent: Wednesday, July 02, 2003 6:29 PM
>> To: [EMAIL PROTECTED]
>> Subject: Re: [OS-webwork] Default workflow
>> 
>> 
>> OK - but I don't see (at a glance) how this is done in an interceptor?
>> 
>> It surely needs a base class, to call the 3 methods in the
>> right order?
>> 
>> M
>> 
> 
> 
> -------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are available now.
> Download today and enter to win an XBOX or Visual Studio .NET.
> http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
> _______________________________________________
> Opensymphony-webwork mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to