You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jean-Marie Pitre <jm...@cofisun.com> on 2006/09/01 08:33:47 UTC

RE : validateValidWhen and javascript

Do you know what is the reason there isn't javascript validation for this rule ?


-----Message d'origine-----
De : Wendy Smoak [mailto:wsmoak@gmail.com] 
Envoyé : jeudi 31 août 2006 17:55
À : Struts Users Mailing List
Objet : Re: validateValidWhen and javascript

On 8/31/06, Jean-Marie Pitre <jm...@cofisun.com> wrote:

> Is there a javascript file to use validateValidWhen method on client
> side ?

No.  If you look in the bundled validation-rules.xml file for 1.3,
there is no 'jsFunction' attribute for validwhen.  (The JavaScript for
the default rules now lives in Commons Validator.)

http://svn.apache.org/repos/asf/struts/struts1/trunk/core/src/main/resources/org/apache/struts/validator/validator-rules.xml

The Java code for validwhen is generated by Antlr.  You can look at
the source, here:
http://svn.apache.org/repos/asf/struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/

-- 
Wendy

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


-------------------
Email Disclaimer
http://www.cofidis.be/emaildisclaimer.php


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


Re: RE : validateValidWhen and javascript

Posted by Laurie Harper <la...@holoweb.net>.
It's not really practicable, considering that a validwhen rule can 
address other properties on the form bean that may or may not have any 
client-side representation, or may have a different representation on 
the client (e.g. strings vs. integers).

L.

Jean-Marie Pitre wrote:
> Do you know what is the reason there isn't javascript validation for this rule ?
> 
> 
> -----Message d'origine-----
> De : Wendy Smoak [mailto:wsmoak@gmail.com] 
> Envoyé : jeudi 31 août 2006 17:55
> À : Struts Users Mailing List
> Objet : Re: validateValidWhen and javascript
> 
> On 8/31/06, Jean-Marie Pitre <jm...@cofisun.com> wrote:
> 
>> Is there a javascript file to use validateValidWhen method on client
>> side ?
> 
> No.  If you look in the bundled validation-rules.xml file for 1.3,
> there is no 'jsFunction' attribute for validwhen.  (The JavaScript for
> the default rules now lives in Commons Validator.)
> 
> http://svn.apache.org/repos/asf/struts/struts1/trunk/core/src/main/resources/org/apache/struts/validator/validator-rules.xml
> 
> The Java code for validwhen is generated by Antlr.  You can look at
> the source, here:
> http://svn.apache.org/repos/asf/struts/struts1/trunk/core/src/main/java/org/apache/struts/validator/validwhen/
> 



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