Yes. Now try this.....

  public  abstract BaseActionForm extends ActionForm inplements ABCInterface
, DEFInterface

  This will let you implement as many interfaces as you want...

cheers,
Amar..

-----Original Message-----
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 8:55 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Design Suggestion


My version of the code has:


        public abstract class ActionForm implements Serializable {

The only interface ActionForm implements is Serializable.

-----Original Message-----
From: Nanduri, Amarnath [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 1:51 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Design Suggestion



What you can do is try to create a BaseActionForm which extends ActionForm
and implements some interface (like FormInterface or something). This should
solve your problem. 

cheers,
Amar..

-----Original Message-----
From: Hardee, Tony [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 14, 2001 12:38 PM
To: '[EMAIL PROTECTED]'
Subject: Design Suggestion


I have a situation where it would be useful if the ActionForm was an
interface rather than an abstract class.  Basically, I had developed some
subclasses of ActionForm that I found useful.  I am now integrating with
another developer who also has useful subclasses of ActionForms.
Unfortunately the implementations are orthogonal.  They create a situation
that could be solved with multiple inheritance.  Since multiple inheritance
is neither supported nor desired, the best solution involves the ability to
extend ActionForm with interfaces rather than through inheritance.

Does anyone know why the ActionForm should not be defined as an interface
with a BasicActionForm providing the current implementation?

Would anyone care to caution me on making this change within my own version
of struts?

Reply via email to