How to bind an object property

In Vaadin 7, I am creating a simple form to edit a JavaBean following this example

How can I access a property of my bean which is not a primitive ? Something like

public class MyBean {
private MyStatus status;


public class MyStatus{
private String statusName;


I would like to be able to access the property using something like binder.bind(myComboBox, “status.statusName”);but this does not work…

Thanks for the help!


You can bind MyStatus by adding the @propertyId annotation

private TextField myStatusName = new TextField("Mystatus");

I always put these fields into an object that extends FormLayout.
Then you just bind this object:

final BeanFieldGroup<MyBean> binder = new BeanFieldGroup<MyBean>(MyBean.class);