Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Vaadin8 bind multiple gui components to single bean
I was reading the new data binding api (binder).
Is it possible to - say - bind the same bean pojo property to ie. different TextField.
For example bind person.name to TextfieldA and TexfieldB?
What is the behaviour in this case?
User types in A -> framework update model person.name -> framework broadcast automatically the change to other bound view components, like B
OR
Textfield B must be synchronized manually?
Or the bean must supports event broadcasting to update all view components bound to it?
Wasn't a scenario possible in previous vaadin data model (Property based?)?
thanks
With Vaadin 7, Property took care of propagating the changes. However, as Vaadin 8 uses POJOs directly (or via user provided lambdas), there is no such intermediate layer. As POJOs don't provide a way to listen for changes, such automatic two-way binding is not supported, and the fields would need a value change listener to trigger explicit update of the other field.
In more complex cases, some kind of an event bus might also be an option.