Yeah I think you're going to have to workaround the parent method.
public class DefaultLookup extends LookupDispatchAction {
public ActionForward execute(.....){
if (request.getParameter(mapping.getParameter()) == null) {
return defaultMethod(....)
} else return super.execute(....);
}
public abstract ActionForward defaultMethod(....) ;
}
This should work! i think...
danny
Wendy Smoak wrote:
Danny Mui wrote:
I extended the dispatch action to do something like that:"".equals(mapping.getParameter())) {
in execute() {
ActionForward forward = null;
if (mapping.getParameter() == null ||
forward = executeAction(mapping, form, request, response);mapping.getParameter());
} else {
forward = super.dispatchMethod(mapping,form,request,response,
}I don't quite understand where this code lives. Is this in a class that
return forward;
}
i'm a little weirder, i like to declaratively tell my action which to execute. so extending the if statement to look at the request/form is possible.
this may not be lookupdispatchaction but close enough i guess?
extends "Action"? Or have you subclassed LookupDispatchAction and "fixed"
the execute() method?
-- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>