Hi Navjot,
I never said that these helper classes are not required..Infact I am using them 
heavily in my application..

What i am saying is U need not extend those acions or copy thier code in your base 
action....BEcause that does not serve any purpose..


U can use the dispatch action as it is...

regards,
Shirish

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


hi shirish,

SAY

We write 2 methods in Action (MUST extend DynamicAction here) Class

public ActionForward add(...)
public ActionForward del(...)

AND
we have action tag in config file saying
<action type=".." parameter="param" >

Calling URLs
a.do?param=add
a.do?param=del

will directly call those methods.

AND there by save  2 IFs in execute(...) method :-)

Hope now you would agree THIS  Helper Action class is really useful ;-)

regards
Navjot Singh

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 31, 2003 6:36 PM
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