I created a Polymer component with different properties. One of them is for example “brandItems”.
Next i generated the serverside of the component with the flow-component-generator.
The generated java code includes a @synchronize annotation, as well as the setter/ getter/ eventlistener for the properties.
Now when i implement the component and assign a change-listener, java does not get notified about property-changes.
But if i change the property name “brandItems” to “branditems” on both sides, it works and the eventlistener on java side gets triggered.
Do i have to consider something special or is this a bug?
Properties with upper-case letters should work normally, so I believe there’s a bug in the generator.
Most likely the generated code listens to brandItems-changed event, while the correct event name would be brand-items-changed.
Polymer generates the client-side property change events by changing the property name from camel-case to dash-separated. Possibly the generator doesn’t make the same conversion.
I’ll have to verify this and create a bug ticket if it’s true.
Thanks for reporting the issue!
Apparently brandItems was not synchronized at all, because of the naming conventions I explained above. It is now fixed: https://github.com/vaadin/flow/pull/3849