2003. janu�r 15. 09:12 d�tummal Phase Web and Multimedia ezt �rtad:
> No, that is different. That has to do with using the form bean name or the
> action 'mapping'. I am talking about having a validate method in the action
> class rather than the ActionForm class.
Sorry, just didn't read the end of the mail.
I think that you can extend the action in the following way:
public class BaseAction extends Action {
ActionForward execute(...) {
ActionErrors errors = validate(...);
if (errors != null && !errors.empty()) {
saveErrors(request, errors);
String input = mapping.getInput();
if (input != null)
return new ActionForward(input);
else
// return sg, thow sg, or like
}
return executeOnValidatedInput(...);
}
ActionErrors validate(...) {
// override this if you need validate in your action
return null;
}
ActionForward executeOnValidatedInput(...) {
// this is what you need to override in your actions.
return null;
}
}
Tib
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>