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