Two way data binder in vaadin 14

It’s possible to create a two way data binder? today I create this code:

Binder parteBinder = new Binder<>(
MyPojo.class);

TextField myTextField = new TextField(“Label”);

parteBinder.forField(myTextField).asRequired().bind(“name”);

parteBinder.setBean(new MyBean());

If I change anything in my TextField the value is reflected to my bean, but If I execute this code:

parteBinder.getBean().setName(“new name”);

the value are not reflected in my TextField.

It’s the default behavior of the binder? or I doing samething wrong?

tks

That’s the default behavior. It can’t know that you have changed the bean. You either call setBean or readBean after your change again. Or do the change in the text field and the bean is automatically updated.