My actions already extend Action. Should I write a superclass that extends Action, and then extend this class, is that correct?
Thanks. -----Original Message----- From: Mark Benussi [mailto:[EMAIL PROTECTED] Sent: 30 September 2004 11:19 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: Reusing methods across actions classes 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]