I would say that if you have common functionality such as a method that all
objects [Actions] share then place the common method in a super class
[Action] that the other classes can extend.
----Original Message Follows----
From: "Ciaran Hanley" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts User Mailing List" <[EMAIL PROTECTED]>
Subject: Reusing methods across actions classes
Date: Thu, 30 Sep 2004 11:16:20 +0100
Hey,
Bit of a dummy question here but I am wondering what is the best way to
reuse methods across different action classes. Is it acceptable to make an
instance of an action class within an action class so I can use one of its
methods. Or would it be better to simply copy and paste the method into the
both classes. Or should I extract all common methods into one class and
create an instance of this class as required. Any suggestions?
CH
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]