Ross,

Just have your 'Cancel' button call a doCancel() method instead. It is a quirk of Webwork 1.3 that validation is only called on the doExecute() method.

http://localhost/YourAction!cancel.action

I'm not entirely sure how it works with the property editors though. This should work for most people.

Cheers,
Scott

Greinke, Ross wrote:
None of the webwork examples demonstrate this idea, but I wanted to pass it by the "experts" to make sure it doesn't break any WW conventions.
I'm on a form that has an update submit button and a cancel submit button. Some of the fields have validation, so the error map may be set.
I'd still like the cancel button to bypass any errors and just go to the view I have outlined in the views.properties file.
Is it OK to just call the superclass setErrors(null) and setErrorMessages(null) in the doValidation() method?
That way I won't get field-level errors after hitting cancel, then have to hit cancel AGAIN to *really* cancel.
I suppose I could put the cancel submit button in a separate form with a completely separate action class that doesn't do much, but my buttons are inside a table inside the form inside another table (which is pretty :) and I don't want to lose the look and feel.
Thanks in advance for all my "newbie" WebWork questions. WebWork rocks!
Ross

--


ATLASSIAN - http://www.atlassian.com
Expert J2EE Software, Services and Support
-------------------------------------------------------
Need a simple, powerful way to track and manage issues?
Try JIRA - http://www.atlassian.com/software/jira



-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to