this sounds good idea...But still I dont see any reason to extend those helpr 
classes..U can use them out of the box :-))

-----Original Message-----
From: Dario Geier [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 3:20 PM
To: Struts Users Mailing List
Subject: RE: Design Problem Action Class


What I meant by delegation is using a different ActionUtility class. The base 
executeAction / performAction method implementation could be implemented as a Template 
method, where you call your checkForLogin and other methods as you wish.
I am not calling other actions, but a neutral independent class.

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


But I dont get the point of extending those Helper Actions...

Becasue those helper classes will never fulfill a request on thier own..So ultimately 
whtever is the application logic in your base action(Like login check etc..)will be 
executed as the call finally goes to some Other applicationAction...

And Also I am not sure what u mean by delegation here..But beware...If u mean caling 
one action which does all of this from all other actions, it is stringly discouraged 
in struts..Use of Actions as APIs is strongly discouraged..

-----Original Message-----
From: Dario Geier [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 2:56 PM
To: Struts Users Mailing List
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]


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

Reply via email to