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
Hi,
I have some problems with using the following regular expression in the
validation framework from Struts.
mask
^\w{2}-\w{6}(-\w{2
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
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
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
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
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
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
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
-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
>
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
-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
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
13 matches
Mail list logo