You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jean-Marie Pitre <jm...@cofisun.com> on 2007/02/16 15:10:54 UTC

DispatchAction and execute

Hi,

 

I have a custom class MyAction which extends a custom ancestor
MyAncestor.

MyAncestor class extended Struts Action. I would like to use
DispatchAction so my Ancestor extends now DispatchAction.

I would like to still use execute method to do some jobs. Is it possible
to use DispatchAction and still call automaticly execute method for each
new method like add,update create .... ?

 

Thank you for your reply,

 

Best regards,

 

 

Jean-Marie.

 


-------------------
Email Disclaimer
http://www.cofidis.be/emaildisclaimer.php


Re: DispatchAction and execute

Posted by Michael Jouravlev <jm...@gmail.com>.
execute() method is called for any action including DispatchAction.
DispatchAction.execute() calls your event handles, but you can
override it if you want.

I suggest using EventDispatchAction instead of DispatchAction. Also,
if you want to extend your own MyAncestor you can use EventDispatcher
class. Search Struts wiki for examples.

Michael.

On 2/16/07, Jean-Marie Pitre <jm...@cofisun.com> wrote:
> Hi,
>
>
>
> I have a custom class MyAction which extends a custom ancestor
> MyAncestor.
>
> MyAncestor class extended Struts Action. I would like to use
> DispatchAction so my Ancestor extends now DispatchAction.
>
> I would like to still use execute method to do some jobs. Is it possible
> to use DispatchAction and still call automaticly execute method for each
> new method like add,update create .... ?
>
>
>
> Thank you for your reply,
>
>
>
> Best regards,
>
>
>
>
>
> Jean-Marie.
>
>
>
>
> -------------------
> Email Disclaimer
> http://www.cofidis.be/emaildisclaimer.php
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org