struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul McCulloch <>
Subject DispatchActions - using form validation for only some methods
Date Wed, 30 Jul 2003 11:58:34 GMT

I've just moved to using dispatch actions from my own implementation of
something similair to relay actions. One facility my implementation gave me
was to have the form validated when some actions were called, and not
validated for other actions (at the expense of a bloated struts-config.xml).

Using dispatch actions I am now explicitly calling the form's validation for
those methods that require a validated form:

        ActionErrors errors = form.validate(mapping, request);
         if(!errors.isEmpty()) {
             saveErrors(request, errors);
             return new ActionForward(mapping.getInput());

Is there a better way of achieving this?



Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not the addressee
indicated in this message (or responsible for delivery of the message to such person), you
may not copy or deliver this message to anyone. In such case, you should destroy this message,
and notify us immediately. If you or your employer does not consent to Internet email messages
of this kind, please advise us immediately. Opinions, conclusions and other information expressed
in this message are not given or endorsed by my Company or employer unless otherwise indicated
by an authorised representative independent of this message.
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via
electronic mail attachments we cannot guarantee that attachments do not contain computer virus
code.  You are therefore strongly advised to undertake anti virus checks prior to accessing
the attachment to this electronic mail.  Axios Systems Ltd grants no warranties regarding
performance use or quality of any attachment and undertakes no liability for loss or damage
howsoever caused.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message