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]

Reply via email to