private TextField readOnlyField = new TextField();
private TextField writableField = new TextField();
@Test
public void bindReadOnlyPropertyToFieldGroup() {
BeanWithReadOnlyField bean = new BeanWithReadOnlyField();
BeanItem<BeanWithReadOnlyField> beanItem = new BeanItem<BeanWithReadOnlyField>(
bean);
beanItem.getItemProperty("readOnlyField").setReadOnly(true);
FieldGroup fieldGroup = new FieldGroup(beanItem);