I am using vaadin 6.6 and joda DateTime 1.6.2 I am using the solution described in How to use DateField with the Joda DateTime property?
The value is set / obtained correctly, but, unfortunately, I get a transition exception:
The exception is the throw inside the BeanValidationValidator:
the method is JodaDateTime and the value is java.util.Date JodaTime is not assigned from the date JodaTime does not have a row constructor
private Object convertValue (Object value)
throws Property.ConversionException {
// Try to assign the compatible value directly
if (value == null
|| method.getType (). isAssignableFrom (value.getClass ())) {
return value;
} else {
try {
// Gets the string constructor
final Constructor constr = method.getType (). getConstructor (
new Class [] {String.class});
return constr.newInstance (new Object [] {value.toString ()});
} catch (final java.lang.Exception e) {
throw new Property.ConversionException (e);
}
}
}Do you have some ideas?
source
share