struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jin Bal" <jin...@hotmail.com>
Subject Re: Extending Action and DispatchAction
Date Mon, 23 Sep 2002 19:03:06 GMT

How about a little helper class that sits in between them ?

That ought to do the trick.

HTH

Jin



----- Original Message -----
From: "Darren Hill" <dhill@724.com>
To: "'Struts Users Mailing List'" <struts-user@jakarta.apache.org>
Sent: Monday, September 23, 2002 7:03 PM
Subject: RE: Extending Action and DispatchAction


> Well,
>
> I have a bunch of common functions ( ie. accessing stateless session bean,
> which accesses EJB's ).
> I've put this functionality in a BaseAction, which extends Action.
>
> I have now got a use for a DispatchAction.  I can extend this to make a
> BaseDispatchAction and 'copy' that code so that all of my actions that
> extend it behave the same way.
>
> I'd like to NOT copy those functions.
>
> So .. in my design ... I've got 2 types of actions ( regular and
Dispatch ),
> but they both have common functions.
> Where do the common functions go so that both types of actions have access
> to them?
>
> Darren.
>
> -----Original Message-----
> From: Galbreath, Mark [mailto:Galbreath@tessco.com]
> Sent: September 23, 2002 1:58 PM
> To: 'Struts Users Mailing List'
> Subject: RE: Extending Action and DispatchAction
>
>
> How are you extending 2 classes at the same time in the same Action class?
> Can you describe your class hierarchy a little more clearly?
>
> Mark
>
> -----Original Message-----
> From: Darren Hill [mailto:dhill@724.com]
> Sent: Monday, September 23, 2002 1:52 PM
>
> If I've got common code that happens in ALL actions and I extend BOTH
Action
> and DispatchAction .. how can I include the common methods for both
actions,
> rather the copying that code in each?
>
> Darren
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>
>

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


Mime
View raw message