Hi ,

I wish that you can get some idea about this from the following link,

http://struts2issues.blogspot.com/

Struts2


Veronica Iturrioz wrote:
> 
> I have a form with client side validation:
> 
>         <s:form validate="true" action="myAction" namespace="/"
> theme="xhtml">    
> 
> and an Action with some annotated validations:
> 
> @Validations(
>     requiredStrings = {
>                 @RequiredStringValidator( message = "Required", type =
> ValidatorType.FIELD,                            fieldName = "name", trim =
> true, key="error.required")
>     ....
> 
> but I get an error because of the key property. If  I delete the key
> property, the client validation executes ok.
> In the package.properties I've the error.required key. 
> 
> How can I do this? I want to execute client-validation with key messages. 
> 
> I try to create a new theme, and replace form-close-validate.ftl :
>     i replace the line:    var error =
> "${validator.getMessage(action)?js_string}";
>     for:
>             <#if validator.defaultMessage?has_content>
>                   var error = "${validator.defaultMessage?js_string}";
>              <#else>
>                  var error =
> "${action.getText(validator.getMessageKey())?js_string}";
>              </#if>
> 
> but the client validation is not executed.  Some themes do not support
> client-side validation. Only useful with theme xhtml/ajax
> 
> thanks in advance.
> Veronica
> 
> 
> 
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 

-- 
View this message in context: 
http://www.nabble.com/Client-side-validation-tp10035555p16002045.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to