From: <[EMAIL PROTECTED]> > I have a form field that I want to be a number in the DB, > but the user can add digits, or digits with commas into. > So 1000 is the same at 1,000 on the ui. > My question is, will struts convert "1,000" to 1000L > just as it will convert "1000" to 1000L?
Struts doesn't do conversions-- BeanUtils (a Jakarta Commons project) does. Use a String in the Form itself, that way you can validate and re-display incorrect data. Then use BeanUtils to copy the data from the form to some object that you hand to the database. If BeanUtils doesn't convert the way you want it to, you can write your own Converter and register it. Does a number with commas pass validation for a long? -- Wendy Smoak --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]