Shouldn't that be a separate "ConfirmDeletionAction" with it's action
mapping validate set to false?

If you wanted to combine multiple actions in one Action Handler but have
that action having auto-validationof formbeans you might try:
1.  Subclassing ActionServlet and overriding it's processValidate method
to not validate if a flag is sent in the HttpRequest (possibly a hidden
variable indicating "confirmDeletion". 
2.  Make your formBean's validate method check for the "do not validate
flag".

-----Original Message-----
From: Erik Hatcher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 11:09 PM
To: [EMAIL PROTECTED]
Subject: Re: How to turn off validation momentarily


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" <[EMAIL PROTECTED]>
To: "struts-user" <[EMAIL PROTECTED]>
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.
> [EMAIL PROTECTED]
> 641.469.3535 Phone
> 413.581.6326 FAX
>
>


Reply via email to