-
1. Re: PropertyChangeHandler for Chained Bindings
csa Aug 23, 2013 4:01 PM (in response to holsen)Hi Chris,
The two code snippets you pasted seem identical but essentially I think you need this to work:
binder.addPropertyChangeHandler("customer.address.streetname", handler);
This should work with the latest 2.4.0-SNAPSHOTs. The final release is planned for September.
Cheers,
Christian
-
2. Re: PropertyChangeHandler for Chained Bindings
holsen Aug 26, 2013 10:07 AM (in response to csa)Hi Christian,
ups, the forum software somehow hides Java Code when using quotatations. Just edited my post above.
I'll have a look at the latest snapshots. Is it also possible to add a ChangeHandler to a whole chained object, e.g.
binder.addPropertyChangeHandler("customer.address", handler);
so that whenever the streetname, ZIP etc. changes a ValueChangeEvent is fired?
Thank you so much for your help!!!
Chris
-
3. Re: PropertyChangeHandler for Chained Bindings
csa Aug 26, 2013 6:01 PM (in response to holsen)Hi Chris,
The property change handler for "customer.address" will fire when the corresponding address reference (the address field of the customer field in your model) changes. It will not fire for e.g. the streetname. You will need to use a handler on "customer.address.streetname" for that.
We could add support for wildcards to differentiate between the two different use cases. So, basically add support for "customer.address.*". Can you create a JIRA for that with your use case if you want this feature?
Thanks,
Christian
-
4. Re: PropertyChangeHandler for Chained Bindings
csa Sep 4, 2013 3:08 PM (in response to csa)Link to the JIRA for wildcard support when registering property change handlers: