-
1. Re: A question about binders' PropertyChangeHandlers and nested Lists
csa Feb 4, 2015 6:23 AM (in response to pnakaska)Hi Philip,
Adding a property change handler for "**" (all properties, recursively) applies to nested lists as well. So, in your example, b.addPropertyChangeHandler("**", handler) will cause the handler to be invoked when the underlying list changes.
I suspect there's something else wrong. Maybe you can create a test case that demonstrates the problem?
Cheers,
Christian
-
2. Re: Re: A question about binders' PropertyChangeHandlers and nested Lists
pnakaska Feb 5, 2015 12:51 PM (in response to csa)Thanks for looking at this, Christian.
Adding a property change handler at the 'B' level does allow the 'B' widget instance to hear the event, but the parent A can't hear them even when using aBinder.addPropertyChangeEvent("**", handler);
--- Since 'B' is contained in a list that belongs to A, shouldn't events in B be available to the A handler?
Attached is an example that has a tripley-nested List:
FacetUIList contains a list of FacetUIs, each FacetUI contains a list of FacetEntryUIs.
FacetUIList is the top level component mapped in TopLevelComponent (java/html)
FacetUI is mapped in a widget FacetUIWidget (java, html), and
FacetEntryUI is mapped in a widget FacetEntryUIWidget (java, html)
FacetEntryUIWidgets have a checkbox mapped to the facetEntryUI.selected ( boolean ).
A handler at FacetEntryUIWidget level is receiving events for changes via the check box change event,
but it's parent FacetUIWidget and it's parent's parent FacetListUIWidget are not able to detect the change to the boolean value, even when using "**" in the specification for the handler.
Shouldn't changes in values trigger the Property change event? and be visible to the parents if receiving, recursively, all child mapped data changes?
-
3. Re: A question about binders' PropertyChangeHandlers and nested Lists
csa Feb 4, 2015 1:58 PM (in response to pnakaska)The attached project doesn't build for me (it fails to resolve some dependencies). Can you attach a test case instead of a full project? It still doesn't quite look like an Errai issue to me. A simple test would help make clear what's wrong. See here for examples: https://github.com/errai/errai/blob/master/errai-data-binding/src/test/java/org/jboss/errai/databinding/client/test/PropertyChangeHandlerIntegrationTest.java
Cheers,
Christian
-
4. Re: Re: A question about binders' PropertyChangeHandlers and nested Lists
pnakaska Feb 6, 2015 5:54 PM (in response to csa)I stripped out everything I can out of this project and removed the local repository references which should fix the reference problem. I don't know how to reduce the example any further and still have the problem. these are fairly basic models and widgets.....
-
erraiexample.tar.gz 35.2 KB
-
-
5. Re: Re: A question about binders' PropertyChangeHandlers and nested Lists
csa Feb 6, 2015 9:50 PM (in response to pnakaska)OK, I see the problem now.
I've created a JIRA to fix this: https://issues.jboss.org/browse/ERRAI-837
Cheers,
Christian
-
6. Re: A question about binders' PropertyChangeHandlers and nested Lists
csa Feb 9, 2015 4:22 PM (in response to csa)Tested your project with the latest 3.2.0- and 3.1.2-SNAPSHOTs and it's working fine now!