Our company has been using struts for about a year now.  We have subclassed
Action and created our own BaseAction to support some additional
functionality and to create an abstraction between changes to Action in the
future and our existing code.  We have done the same with most core Struts
classes.

With 1.1, a new subclass of Action, DispatchAction has been created.  Since
DispatchAction subclasses Action, BaseAction and DispatchAction are at the
same "level".  In order to use DispatchAction and keep the functionality of
BaseAction I have thought of two ways to do it, but neither is optimal.

1) Subclass DispatchAction and put the functions from BaseAction into a
BaseDispatchAction.  The problem is maintaining the same code in two
seperate classes.

2) Turn BaseAction into a composite class and add an Action as a property of
the class.  This would allow the most flexibility since any Action object
could then be used.  The problem is that this would require some sort of
change to either the struts-config.xml and/or to the ActionServlet.  This is
because somewhere after the new BaseAction gets instantiated, an Action
would need to get passed in.

Does anyone have any thoughts on how to solve this problem?

Thanks,
steve 

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

Reply via email to