RE: Struts Validation Problems

2007-04-24 Thread Raghupathy, Gurumoorthy
lto:[EMAIL PROTECTED] Sent: 23 April 2007 13:17 To: user@struts.apache.org Subject: Struts Validation Problems Hi, I have some problems with using the following regular expression in the validation f

Struts Validation Problems

2007-04-23 Thread Ferruh Zamangör
Hi, I have some problems with using the following regular expression in the validation framework from Struts. mask ^\w{2}-\w{6}(-\w{2

Re: Two Struts validation problems

2007-03-04 Thread Oren Livne
Oren Livne wrote: P.S. An important fact I forgot to mention: my VO is persisted to a database using Hibernate. Hibernate wraps this object with its own type. Is it possible that the type conversion (String -> int) is not working properly because Hibernate's wrapper gets in the way? I did a si

Re: Two Struts validation problems

2007-03-03 Thread Martin Gainty
l" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Saturday, March 03, 2007 6:50 PM Subject: Re: Two Struts validation problems > Chris is right, the zero occurs in the java.lang.Integer(String) > constructor when it is passed a non-numeric string value. You

Re: Two Struts validation problems

2007-03-03 Thread Oren Livne
P.S. An important fact I forgot to mention: my VO is persisted to a database using Hibernate. Hibernate wraps this object with its own type. Is it possible that the type conversion (String -> int) is not working properly because Hibernate's wrapper gets in the way? I did a simple test of copying

Re: Two Struts validation problems

2007-03-03 Thread Oren Livne
Dear Laurie & Christopher: Great! Thanks. I'm using Strings now in my form. But as I wrote to Ed, suppose I validated the form and would like to copy all properties to a VO (value object) / DTO with one call (e.g. copyProperties()). How do I get it to automatically convert my form String prope

Re: Two Struts validation problems

2007-03-03 Thread Laurie Harper
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Oren, Oren Livne wrote: Dear Chris: Yes, other validations are working. For instance, I also have an "intRange" validation on the same integer field. If I type a letter for the integer field, it sets it to 0, displays it

Re: Two Struts validation problems

2007-03-03 Thread Oren Livne
Dear Ed: Thanks so much for your response (all other that replied -- thanks so much as well!). For now, I would like to stick to the first solution: ActionForm with String properties. I already have VOs and don't mind copying over from the form to the VO and back. My last question on this issu

Re: Two Struts validation problems

2007-03-03 Thread Ed Griebel
Chris is right, the zero occurs in the java.lang.Integer(String) constructor when it is passed a non-numeric string value. You would see this happen in your ActionForm and action class if you weren't using the validator. The same thing happens with a non-numeric in a java.lang.Double(String) const

Re: Two Struts validation problems

2007-03-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Oren, Oren Livne wrote: > Dear Chris: > Yes, other validations are working. For instance, I also have an > "intRange" validation on the same integer field. If I type a letter for > the integer field, it sets it to 0, displays it as 0, and says it's >

Re: Two Struts validation problems

2007-03-03 Thread Oren Livne
Dear Chris: Yes, other validations are working. For instance, I also have an "intRange" validation on the same integer field. If I type a letter for the integer field, it sets it to 0, displays it as 0, and says it's outside the permissible range (which happens to be 1-4). No errors on startup

Re: Two Struts validation problems

2007-03-03 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Oren, Oren Livne wrote: > 1) I have a form property that is an integer. When I set its validation > rule to "integer", it has no effect. [snip] > 2) A "validwhen" test condition seems to be ignored: Are other validations working? It's possible that

Two Struts validation problems

2007-03-03 Thread Oren Livne
Dear All: I have two problems with Validator. I'm using Struts 1.3.5, Tomcat 6.0.9 and Java 1.6: 1) I have a form property that is an integer. When I set its validation rule to "integer", it has no effect. - The form field is populated with a zero value even if a letter is typed in the form i