BeanFieldGroup: Date Field is not build

Hey,

I have an Issue binding a date field to a form using BeanFieldGroup

Here is my code snippet:


item = new myItem();
Form = new FormLayout();
itemBean = new BeanFieldGroup<MyItem>(MyIItem.class);
itemBean.setItemDataSource(item);
...
itemForm.addComponent(itemBean.buildAndBind("Date", "Date",DateField.class);

The bean is defined as:


public class MyItem {
...
private Date Date;
...
}

The error code is:


Caused by: com.vaadin.data.fieldgroup.FieldGroup$BindException: Unable to build a field of type com.vaadin.ui.DateField for editing java.util.Date

Any idea why it is not possible to build the field?

I’ve found a suitable solution for this issue here:

http://java.dzone.com/articles/bean-validation-vaadin-7