I use vaadin 6.6 and joda DateTime 1.6.2
I use solution described at http://vaadin.com/forum/-/message_boards/view_message/371184
Value is set/get correctly, but unfortunatelly I get Conversion exception:
Exception is throw inside BeanValidationValidator:
method is JodaDateTime and value is java.util.Date.
JodaTime is not assignable from Date.
JodaTime doesn’t have String 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???