V8 detect changed property name


in V7 we used
String propertyName = (String) binder.getPropertyId((Field<?>) valueChangeEvent.getProperty()); to detect name of changed property in our custom fields.

Plz what si the way to do this in V8?

The data model is different in Vaadin 8, there are no Items or Properties, but you use Java Beans for the data binding.

See Migrating to Framework 8 | Migration | Framework | Vaadin 8 Docs for more information

Editing Values in Fields | Vaadin Data Model | Framework | Vaadin 8 Docs more specifically

Yes, I read that

Still the binder uses property names for binding, eitgher explicit or detected using reflection

The events and/or seem to not provide them

The events and/or public/protected API seem not to provide them,


We have very complex UI, tree like nested components with many hundreds of fields

That are bound to a model using paths built from property names

That’s something you’ll need to refactor somehow

There’s unfortunately no simple replacement for the old API

That is really brutal and when I am abnout to majke a decision when to use vaadin again I must remember this

If you don’t have another option, you can always monkey-patch the Vaadin files to expose the protected/private members

but that’s a temporary solution at best

Yes, that is what we are investigating now, I hoped that there would be some recommendation about this

Something that would allow us to map valuechanged event to propety name

And with Vaadin 8, there’s always the Vaadin 7 compatibility kit you can fall back to

We are paying fot hat already