Re: Validator with property String array problem
I have done some work with client-side indexed field validation...mostly, I have written a couple custom validations that can validate indexed or non-indexed fields based on a few attributes that I set in validation.xml. My validators are somewhat pointed towards my particular needs and the way that my indexed properties are build, but not quite applicable to any application...not yet at least. If you already have javascript code to maintain the indexed attributes (a table that can shrink and grow), then you already have a lot of the code that will help you write your own custom validation... Nick David Graham grahamdavid1980@To: Struts Users Mailing List [EMAIL PROTECTED] yahoo.com cc: Subject: Re: Validator with property String array problem 08/26/2003 02:27 PM Please respond to Struts Users Mailing List The server side checks were fixed but the javascript is still limited to single fields. David --- Suhel Rizvi Hotmail Account [EMAIL PROTECTED] wrote: Hi David, Thanks for the info but still not made progress and wonder if you can help or point me in the right direction for implementation guidance. I tried downloading latest nightly build of commons-validator (commons-validator-20030826.zip) and deployed it into my application to the WEB-INF/lib directory but still got the same result as before (validation occurs but no pop up error messages appearing) Am I using the correct syntax in the strut-config.xml and validation.xml and my jsp or do I need to change it? Are there any online notes as to how to correctly use the fixed commons-validator for validating propety String arrays ? Thanks and regards Suhel - Original Message - From: David Graham [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 22, 2003 2:41 PM Subject: Re: Validator with property String array problem Commons Validator was recently modified to allow the required validation in Struts to run on String[] or Collection objects. You can download the latest Validator nightly build to try it out. David --- java-dude [EMAIL PROTECTED] wrote: Hi, I am having problems using Validator framework to perform client side validation on a String array property declared in a DynaValidatorForm. The results are that the validation does seem to work in a fashion such that the user is not taken to the next page and is kept on current jsp while data entered is invalid BUT no pop up alert error messages are being diplayed. (For other forms in the application where I am validating single properties the validation and pop up error messages are working fine.) Has anybody solved/encountered this problem ? I have provided the relevant snippets from my current configuration to illustrate my implementation :- struts-config.xml = . . . form-bean name=enterReadingForm type=org.apache.struts.validator.DynaValidatorForm form-property name=theReading type=java.lang.String[]/ /form-bean . . . validation.xml == . . . form name=enterReadingForm field property=theReading indexedListProperty=theReading depends=required,minlength,maxlength,mask arg0 key=prompt.theReading/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ var var-nameminlength/var-name var-value1/var-value /var
Re: Validator with property String array problem
Hi David, Thanks for the info but still not made progress and wonder if you can help or point me in the right direction for implementation guidance. I tried downloading latest nightly build of commons-validator (commons-validator-20030826.zip) and deployed it into my application to the WEB-INF/lib directory but still got the same result as before (validation occurs but no pop up error messages appearing) Am I using the correct syntax in the strut-config.xml and validation.xml and my jsp or do I need to change it? Are there any online notes as to how to correctly use the fixed commons-validator for validating propety String arrays ? Thanks and regards Suhel - Original Message - From: David Graham [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 22, 2003 2:41 PM Subject: Re: Validator with property String array problem Commons Validator was recently modified to allow the required validation in Struts to run on String[] or Collection objects. You can download the latest Validator nightly build to try it out. David --- java-dude [EMAIL PROTECTED] wrote: Hi, I am having problems using Validator framework to perform client side validation on a String array property declared in a DynaValidatorForm. The results are that the validation does seem to work in a fashion such that the user is not taken to the next page and is kept on current jsp while data entered is invalid BUT no pop up alert error messages are being diplayed. (For other forms in the application where I am validating single properties the validation and pop up error messages are working fine.) Has anybody solved/encountered this problem ? I have provided the relevant snippets from my current configuration to illustrate my implementation :- struts-config.xml = . . . form-bean name=enterReadingForm type=org.apache.struts.validator.DynaValidatorForm form-property name=theReading type=java.lang.String[]/ /form-bean . . . validation.xml == . . . form name=enterReadingForm field property=theReading indexedListProperty=theReading depends=required,minlength,maxlength,mask arg0 key=prompt.theReading/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ var var-nameminlength/var-name var-value1/var-value /var var var-namemaxlength/var-name var-value6/var-value /var var var-namemask/var-name var-value^[0-9]*$/var-value /var /field /form . . . ApplicationResources.properties === . . . prompt.theReading=The Reading . . . enterReading.jsp . . . nested:iterate id=registerDetails name=readingDetails scope=page property=register nested:text name=registerDetails property=theReading size=6 maxlength=6/ /nested:iterate . . . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator with property String array problem
Hi David, Thanks for the info but still not made progress and wonder if you can help or point me in the right direction for implementation guidance. I tried downloading latest nightly build of commons-validator (commons-validator-20030826.zip)as you suggested and deployed it into my application to the WEB-INF/lib directory but still got the same result as before (validation occurs but no pop up error messages appearing) Am I using the correct syntax in the strut-config.xml and validation.xml and my jsp or do I need to change it? Are there any online notes as to how to correctly use the fixed commons-validator for validating property String arrays ? Thanks and regards Suhel --- In [EMAIL PROTECTED], David Graham [EMAIL PROTECTED] wrote: Commons Validator was recently modified to allow the required validation in Struts to run on String[] or Collection objects. You can download the latest Validator nightly build to try it out. David --- java-dude [EMAIL PROTECTED] wrote: Hi, I am having problems using Validator framework to perform client side validation on a String array property declared in a DynaValidatorForm. The results are that the validation does seem to work in a fashion such that the user is not taken to the next page and is kept on current jsp while data entered is invalid BUT no pop up alert error messages are being diplayed. (For other forms in the application where I am validating single properties the validation and pop up error messages are working fine.) Has anybody solved/encountered this problem ? I have provided the relevant snippets from my current configuration to illustrate my implementation :- struts-config.xml = . . . form-bean name=enterReadingForm type=org.apache.struts.validator.DynaValidatorForm form-property name=theReading type=java.lang.String[]/ /form-bean . . . validation.xml == . . . form name=enterReadingForm field property=theReading indexedListProperty=theReading depends=required,minlength,maxlength,mask arg0 key=prompt.theReading/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ var var-nameminlength/var-name var-value1/var-value /var var var-namemaxlength/var-name var-value6/var-value /var var var-namemask/var-name var-value^[0-9]*$/var-value /var /field /form . . . ApplicationResources.properties === . . . prompt.theReading=The Reading . . . enterReading.jsp . . . nested:iterate id=registerDetails name=readingDetails scope=page property=register nested:text name=registerDetails property=theReading size=6 maxlength=6/ /nested:iterate . . . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com --- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator with property String array problem
The server side checks were fixed but the javascript is still limited to single fields. David --- Suhel Rizvi Hotmail Account [EMAIL PROTECTED] wrote: Hi David, Thanks for the info but still not made progress and wonder if you can help or point me in the right direction for implementation guidance. I tried downloading latest nightly build of commons-validator (commons-validator-20030826.zip) and deployed it into my application to the WEB-INF/lib directory but still got the same result as before (validation occurs but no pop up error messages appearing) Am I using the correct syntax in the strut-config.xml and validation.xml and my jsp or do I need to change it? Are there any online notes as to how to correctly use the fixed commons-validator for validating propety String arrays ? Thanks and regards Suhel - Original Message - From: David Graham [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, August 22, 2003 2:41 PM Subject: Re: Validator with property String array problem Commons Validator was recently modified to allow the required validation in Struts to run on String[] or Collection objects. You can download the latest Validator nightly build to try it out. David --- java-dude [EMAIL PROTECTED] wrote: Hi, I am having problems using Validator framework to perform client side validation on a String array property declared in a DynaValidatorForm. The results are that the validation does seem to work in a fashion such that the user is not taken to the next page and is kept on current jsp while data entered is invalid BUT no pop up alert error messages are being diplayed. (For other forms in the application where I am validating single properties the validation and pop up error messages are working fine.) Has anybody solved/encountered this problem ? I have provided the relevant snippets from my current configuration to illustrate my implementation :- struts-config.xml = . . . form-bean name=enterReadingForm type=org.apache.struts.validator.DynaValidatorForm form-property name=theReading type=java.lang.String[]/ /form-bean . . . validation.xml == . . . form name=enterReadingForm field property=theReading indexedListProperty=theReading depends=required,minlength,maxlength,mask arg0 key=prompt.theReading/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ var var-nameminlength/var-name var-value1/var-value /var var var-namemaxlength/var-name var-value6/var-value /var var var-namemask/var-name var-value^[0-9]*$/var-value /var /field /form . . . ApplicationResources.properties === . . . prompt.theReading=The Reading . . . enterReading.jsp . . . nested:iterate id=registerDetails name=readingDetails scope=page property=register nested:text name=registerDetails property=theReading size=6 maxlength=6/ /nested:iterate . . . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 19/08/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validator with property String array problem
Commons Validator was recently modified to allow the required validation in Struts to run on String[] or Collection objects. You can download the latest Validator nightly build to try it out. David --- java-dude [EMAIL PROTECTED] wrote: Hi, I am having problems using Validator framework to perform client side validation on a String array property declared in a DynaValidatorForm. The results are that the validation does seem to work in a fashion such that the user is not taken to the next page and is kept on current jsp while data entered is invalid BUT no pop up alert error messages are being diplayed. (For other forms in the application where I am validating single properties the validation and pop up error messages are working fine.) Has anybody solved/encountered this problem ? I have provided the relevant snippets from my current configuration to illustrate my implementation :- struts-config.xml = . . . form-bean name=enterReadingForm type=org.apache.struts.validator.DynaValidatorForm form-property name=theReading type=java.lang.String[]/ /form-bean . . . validation.xml == . . . form name=enterReadingForm field property=theReading indexedListProperty=theReading depends=required,minlength,maxlength,mask arg0 key=prompt.theReading/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ var var-nameminlength/var-name var-value1/var-value /var var var-namemaxlength/var-name var-value6/var-value /var var var-namemask/var-name var-value^[0-9]*$/var-value /var /field /form . . . ApplicationResources.properties === . . . prompt.theReading=The Reading . . . enterReading.jsp . . . nested:iterate id=registerDetails name=readingDetails scope=page property=register nested:text name=registerDetails property=theReading size=6 maxlength=6/ /nested:iterate . . . - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]