Title: Message
I am getting an exception from the params interceptor.
 
I have an action with a setId(Long), and a hidden form field called id that initially has an empty string value.
 
This used to work, until the exception handeling was improved with the type converters.  Now, I get this error :
 
 id - [Invalid field value for field "id".]
 
which is because of  java.lang.NumberFormatException: For input string: ""
in XWorkBasicConverter.super.convertValue(context, value, toType); at line 85.
 
I can see a couple of soloutions
 
a) in my forms, don't render the hidden input if there is no value for id (fair bit of work)
b) create a custom type converter for Long (and other numeric types) that convert empty string to null (fairly easy)
c) modify the XWorkBasicConverter to support the empty string to null conversion for Number types.  (every one can use this)
 
What are your thoughts ?
 
Cameron

Reply via email to