Re: Cancel in a form re: bypass Validation

2010-12-10 Thread Greg Akins
Thanks Li.. you're correct. And I'm still wondering why the form in my Application won't display fieldError messages when I use only Serverside validation. If, on the s:form, I use validation=true the javascript is included to do validation, and the errorMessages automagically appear

Re: Cancel in a form re: bypass Validation

2010-12-10 Thread Dave Newton
On Fri, Dec 10, 2010 at 8:19 AM, Greg Akins angryg...@gmail.com wrote: Thanks Li.. you're correct. And I'm still wondering why the form in my Application won't display fieldError messages when I use only Serverside validation. If, on the s:form, I use validation=true the javascript is

Cancel in a form re: bypass Validation

2010-12-09 Thread Greg Akins
I need to have a Cancel button on a form that skips the validation (Struts 2.2.1). This seems harder than it should be and maybe I'm missing something. I've read a few posts about this and ended using the validation interceptorref to get this to work. I've had problems getting the

Re: Cancel in a form re: bypass Validation

2010-12-09 Thread Michal Ciasnocha
Hi Greg, I use in my code @SkipValidation annotation for method which I don't want to validate. For me it is easier than use interceptors. @SkipValidation public String cancel() { return SUCCESS; } The second part - redirect - I hope is correct. Regards, Michal. Greg Akins wrote on

Re: Cancel in a form re: bypass Validation

2010-12-09 Thread Greg Akins
On Thu, Dec 9, 2010 at 3:26 PM, Michal Ciasnocha m...@struts.cz wrote: Hi Greg, I use in my code @SkipValidation annotation for method which I don't want to validate. For me it is easier than use interceptors. @SkipValidation public String cancel() {    return SUCCESS; } The second part

Re: Cancel in a form re: bypass Validation

2010-12-09 Thread Li Ying
I think Michal was right. If you don't want execute validation for some Action Method, the annotation @SkipValidation is a good solution. And, in your case, I noticed that, your server side action is doing nothing when the [cancel] button clicked. I suggest you can put a html Link for your