You should generally use Strings for your form bean properties.  When you
validate it, check to see if the numbers were entered.  Then in either the
form or the action, you can convert the String to some kind of number, using
the Integer class.  The class has some kick ass methods for type
conversions.
Good luck.

~ Keith
http://www.buffalo.edu/~kkamholz



-----Original Message-----
From: Glen Mazza [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 1:38 PM
To: [EMAIL PROTECTED]
Subject: (newbie) html:text tag, enforcing numeric input


Quick question (I couldn't find the answer in the
Struts documentation):  How do I enforce numeric (as
opposed to alphanumeric) entry into html:text tags.  

For example:

<html:password property="Employee Number" size="5"
maxlength="5"/>

I would the user just to be able to type numbers for
this field.

Thanks,
Glen


_________________________________________________________
Do You Yahoo!?
Información de Estados Unidos y América Latina, en Yahoo! Noticias.
Visítanos en http://noticias.espanol.yahoo.com

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to