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
(theme="xhtml")

However, if I don't use <s:form validation="true">  the validation
still works (page result is INPUT) but the error messages aren't
rendered.  When I create a simple "Hello World" app, it does work; and
I can't figure out which bit of Struts I've broken in trying to get my
application's validation to work.

On Thu, Dec 9, 2010 at 7:14 PM, Li Ying <liying.cn.2...@gmail.com> wrote:
> I think Michal was right.
>
> If you don't want execute validation for some Action Method, the
> annotation "@SkipValidation" is a good solution.

Sure.. but serverside validation (which is affected by the annotation
(either SkipValidation, or the interceptorref) works.

> 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 [cancel] button, instead of
> a submit button.

Right.. and a links works.. but I'm trying to understand how to get
the button to work, in case I have to use a cancel button either in
this case, or in the future.

>
> So, when it be clicked, browser will jump to the next page, and your
> form will not be submitted.
> And of cause, the validation will not be executed.
>



-- 
Greg Akins

http://insomnia-consulting.org
http://www.pghcodingdojo.org
http://pittjug.dev.java.net
http://twitter.com/akinsgre
http://www.linkedin.com/in/akinsgre

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to