You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tom Miller <tm...@lisco.com> on 2001/07/19 05:24:20 UTC

How to turn off validation momentarily

Hello

Is there a way to turn off form validation momentarily, say for just one
action.perform() invocation? I've tried placing a
mapping.setValidation(false) in various places in my "edit" and "save"
actions (a la struts-example). Basically, I do not want to validate a
record that I'm presenting to the user in order to confirm a delete, but
the form is set up for validation, so that gets executed too. But we're
deleting, so why bother?

Thanks in advance for any tips.

--
Tom Miller
Miller Associates, Inc.
tmiller@lisco.com
641.469.3535 Phone
413.581.6326 FAX



Re: How to turn off validation momentarily

Posted by Erik Hatcher <er...@earthlink.net>.
In struts-config you can specify that validation won't occur on a per-action
basis like this:

<action path="/someaction"
    type="com.whatever.SomeAction"
    scope="request"
    name="SomeForm"
    input="some.jsp"
    validate="false">
          <forward name="receipt"path="another.jsp" />
</action>

Does that help?

    Erik

----- Original Message -----
From: "Tom Miller" <tm...@lisco.com>
To: "struts-user" <st...@jakarta.apache.org>
Sent: Wednesday, July 18, 2001 8:24 PM
Subject: How to turn off validation momentarily


> Hello
>
> Is there a way to turn off form validation momentarily, say for just one
> action.perform() invocation? I've tried placing a
> mapping.setValidation(false) in various places in my "edit" and "save"
> actions (a la struts-example). Basically, I do not want to validate a
> record that I'm presenting to the user in order to confirm a delete, but
> the form is set up for validation, so that gets executed too. But we're
> deleting, so why bother?
>
> Thanks in advance for any tips.
>
> --
> Tom Miller
> Miller Associates, Inc.
> tmiller@lisco.com
> 641.469.3535 Phone
> 413.581.6326 FAX
>
>