So your execute in BaseActionUA might look like...
execute(..) { String parameter = mapping.getParameter(); if (parameter != null) { super.execute(mapping,.... ); } else { return executeAction(mapping,...); } }
I 'think' the above might do what you want, but not positive. You Base Action would thus act as your standard BaseAction or would act as a DispatchAction given that the proper dispatch parameter was passed in the request.
Scott Purcell wrote the following on 4/7/2005 5:01 PM:
Hello,
In an application that I am coding, I had the need to subclass the Action class in order to take care of some session handling. So I subclass this type scenario in all my action classes:
######
abstract public class BaseActionUA extends Action {
public ActionForward execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws Exception {
return executeAction(mapping, form, request, response, getAppObject(request, response), getUserObject(request, response));
}
/** method that must be overriden by the subclasses. */
abstract public ActionForward executeAction(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response,
AppObject appObject,
UserObject userObject)
throws Exception;
All is good with that. But I have created quite a few action classes, and would like to try implementing the DispatchAction class to eliminate some of the "c.r.u.d" type of actions.
The problem I have is I cannot figure out how to subclass this and add in my needed functionality, because it looks like it just wants a clean action and I need (currently) to use something like a executeAction subclass method call.
Does anyone have any information in regards to using this?
Thanks,
Scott
-- Rick
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]