What is the best way to bind an input form on a web page to a primitive type in an object? Say you have an input form where someone types in an age, and that age is stored as an int in my object. If I type a value in the form field, it binds correctly to the int field in my object.
However, if I leave my form field blank and press submit, it complains that it cannot convert
string to int.
Is the way to handle this by providing a custom property editor, or is the preferred way to manually get that form parameter from the HttpServletRequest and populate the object?
Thanks for the help
Brian