Hi everyone,
I am trying to bind a collection to multiple ListViews (works perfectly) and a detail window which displays data of a selected model (this is the part that won't work). Each of the ListViews resides in a tab window.
- The first tab window holds a ListView bound to the collection. Additionally you can apply changes to the models in the collection.
- The second just holds another ListView bound to the collection
- In the third tab window, a detail window is opened when you click on one of the ListView's items.
- The detail window holds a reference to the selected collection model.
My expectation is that all of the views (including the detail window) are updated in case you apply changes to a model. But I can't seem to get this working. As expected changes in the collection are reflected by all of the ListViews involved ... but the detail window - in case it is opened before the update is done - just won't refresh.
My question: What do I have to do to also reflect the changes in the detail window?
There is a dummy app illustrating my problem on github: https://github.com/leonidpushkin/_DataBinding
- Click the 'ListView III' tab
- Click the first entry (a detail window opens)
- Click the 'ListView I' tab
- Click the 'Update comment' button of the first entry
- Enter a new comment and click 'Update'
You will find that the the change is reflected in 'ListView I' and 'ListView II', which is good. But it is not reflected in the detail window of the 'ListView III' tab.
Of course I must have missed something, but I already searched the docs, the Q&A, and looked at the alloy examples.
Thanks, Thomas