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.
FieldGroup. Less error-prone binding
Hi vaadiners,
Just wanted to ask what would be a the best practice in order not to be able to make mistakes at the time of binding fields to bean properties.
Having a TextField that is called "txtName", right now I do always something like:
binder.bind(txtName, "name")
Using a String is very error prone and I was wondering if there was a more robust way for doing this things.
Is having property name "enums" the only way to go? Something like:
binder.bind(txtName, Person.MetaInfo.NAME)
Is there anything that, by convention, will scan a bean reading it's property names and bind all to fields that are called the same?
I know that I can use the @PropertyId annotation over the bean fields, but I don't like the idea of "polluting" the VO's, DTO's or Entities with UI technology related annotations.
Thanks in advance
Fran