|
From: <tri...@tr...> - 2003-07-16 03:35:28
|
Ken and All, Are there any examples where the HTML Form has some input fields that are used to enter numeric values. What is the best way to handle non numeric input for numeric fields? I'm trying to bind to a commandObject that has a field that is an integer. I have tried using an int and it works if I enter a number but if I leave the field blank or enter an non nueric value, then I get the following error message from the bind during validation: Failed to convert property value of type [java.lang.String] to required type [int]; nested exception is: java.lang.NumberFormatException: For input string: "" Using an Integer it does not work at all - I get this error message: Failed to convert property value of type [java.lang.String] to required type [java.lang.Integer]; nested exception is: java.lang.IllegalArgumentException: argument type mismatch Thomas |