struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Witt, Mike (OH35)" <mike.w...@honeywell.com>
Subject RE: Newbie to struts with a question on text fields
Date Mon, 01 Dec 2003 20:33:08 GMT
Not sure if you are using a form bean or a dynaactionform.  But, specify a
String type field and then validate the string and convert to numeric.

Mike

-----Original Message-----
From: Nandita Rajagopalan [mailto:narajago@cisco.com]
Sent: Monday, December 01, 2003 1:47 PM
To: struts-user@jakarta.apache.org
Subject: Newbie to struts with a question on text fields


Hi,

I have a textbox which is supposed to hold a numeric value - ie the property
corresponds to a numeric datatype in the Action form. If I leave this
textbox empty , I want my validate method to catch it and print an error as
this field is a required field. However, when I leave this text empty, a
value of  0 gets placed in the property's value . 0 is an allowed value and
hence no error gets dumped. How do I get around this problem ?

Thanks.

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

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


Mime
View raw message