commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Vanspall <ste...@ibsglobalweb.com>
Subject Getting validator to include validatorUtils
Date Thu, 22 Feb 2007 22:21:41 GMT
Hi,

I am sorry for the really obvious question, I have searched google etc, 
can't find the answer.

Basically I am involved with the upgrade of struts from a very old 
version to the latest one, this incorporates an upgrade to 
commons-validator.

I have never used commons-validator before but the existing code base I 
am working on is fairly dependant on it.

I have worked out some of the changes from the version we were using (1.0.2)

My problem now is that the pages that use javascript validation 
currently include the required javascript for the validation functions, 
but does not include the validator utils javascript functions.

Is there some addition I have to make with to validator-rules.xml or 
validation.xml to have validator util included. I assume I don't have to 
actually include the validator js file in the page as it seems the 
validator-rules is set up to inlcude only the required javascript for me.

basically the javascript validation doesn't work because the browser 
doesn't have the code for jcv_retrieveFormName function.

I have included below a sample of the converted validation-rules, I 
didn't include it all because it still have some changes to make to 
comply with he new version.

----------
 <validator name="required"
            classname="org.apache.struts.validator.FieldChecks"
               method="validateRequired"
         methodParams="java.lang.Object,
                       org.apache.commons.validator.ValidatorAction,
                       org.apache.commons.validator.Field,
                       org.apache.struts.action.ActionMessages,
                       org.apache.commons.validator.Validator,
                       javax.servlet.http.HttpServletRequest"
                 jsFunction="required">
----------

this originally had the javascript defined in the xml file, changing it 
to what you see above has now created the correct javascript for this 
version.

Any help would be great

Regards

Steve


-- 
IBSA Logo*Steve Vanspall
Developer*
Level 2 476 St Kilda Road Melbourne VIC 3004
T 613 8807 5255 | F 613 8807 5203 | M 0438 221 058 | www.ibsglobalweb.com 
<http://www.ibsglobalweb.com>
This e-mail (and any attachments to this e-mail) is for the exclusive 
use of the person, firm or corporation to which it is addressed and may 
contain information that by law is privileged, confidential or protected 
by copyright. If you are not the intended recipient or the person 
responsible for delivering this e-mail to the intended recipient, you 
are notified that any use, disclosure, distribution, printing or copying 
of this e-mail transmission is prohibited by law and that the contents 
must be kept strictly confidential. If you have received this e-mail in 
error, kindly notify us immediately on + 613 8807 0168 or respond to the 
sender by return e-mail. The original transmission of this e-mail must 
be destroyed.
 
Internet Business Systems Australia Pty Ltd accepts no responsibility 
for any viruses this e-mail may contain. This notice should not be removed.


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


Mime
View raw message