On 2 Mar 2004, at 20:03, Larry Meadors wrote:
Bean utils (what struts uses in this case) sucks when it comes to parsing anything but Strings.
Generally what I do is make put String getter/setter methods on the Form, then in those (or in the Action) use a SimpleDateFormat to parse the string into a date. One other thing to note there is that the date format MM/dd/yy will parse 1/1/04 as 01/01/2004, but 1/1/4 as 01/01/0004, so you need to handle that yourself.
Same trick with numeric classes.
Larry
Hello,[EMAIL PROTECTED] 03/02/04 11:36 AM >>>
I have and ActionForm with one element refering to a Date (from Util) property and I get the following exception
java.lang.IllegalArgumentException: argument type mismatch
Is there a special treatment for these kind of attributes?
Thanks,
_________________________ Vanessa Monteiro Analista de Sistemas Quality Software 3475-3000 r:5062
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]