Yes, delegation is the common alternative for multiple inheritance. If you are using 
IntelliJ, you can use the Code / Delegate Methods menu option. It will write the 
methods for you :)

-----Original Message-----
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:59 PM
To: Struts Users Mailing List
Subject: Re: Design Problem Action Class


so this is the only solution
i was thinking if somehow i can 2 extend classes. ;-)
__C++ was good__

----- Original Message -----
From: "Dario Geier" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, March 31, 2003 6:26 PM
Subject: RE: Design Problem Action Class


I am having the same problem shortly. I am thinking of the following
solution:

First, you'll need to inherit from all the action type classes you'll need
in your application.

Action DispatchAction SwitchAction
   Y Y        Y
MyAction MyDispatchAction MySwitchAction

>From this custom layer, use delegation to call common to all actions
functionality. Then, you write this functionality just once, and it is
"actiontype independent".

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:35 PM
To: [EMAIL PROTECTED]
Subject: RE: Design Problem Action Class


I had faced simalr problem..

We have our own AbstractAction and other action hierarchy..And i still
wabnted to use the action classes from Scaffold package(FindForward action
etc..)

But what I have done is I am using those action classes as they are,they do
not belong to my applications action hierarchy..And that makes sense..

BEcause most of those action classes are utility classes .So they do not
belong to your applications action hierarchy.And even if they do not extend
from the AbstractAction of u r appliaction, u will not have any
problem.BEcause they are necven called directly.They are used some where in
the application flow as utility classes.

hope this helps,
Shirish

-----Original Message-----
From: Navjot Singh [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 2:28 PM
To: Struts Users List
Subject: Design Problem Action Class


Hi geeks,

I have class hierarchy like this.

CustomerAction
        Y
   AppAction
        Y
     Action

Now that i have seen DisapatchAction, I wish to use it for my further
actionclasses.
BUT the problem is DispatchAction extends Action.

One way i can think of is to change AppAction to start extending
DisptachAction.
BUT all of my classes don't need the functionality of DisptachAction.
Just a few need this functionality.

How can I go about it?

regards
Navjot Singh



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to