-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I'm using MVVM, trying to update some data in a non HTTP thread and then have server push send the notify the binder that the data has changed. However, I can't seem to figure out how to do it.
I put together a quick ZK fiddle to demo my problem here: zkfiddle.org/sample/2nnnbu2/2-MVVM-and-server-push.
I would have hoped that clicking the Asynch update would update the values in the complete column and an item would be added to the list asynchronously. However, it doesn't seem to work, even though the model data is being changed (as you can see by clicking the reload button after the asynch button).
Is there a way of using Server Push with MVVM?
Try my version. See link. Remember that accessing outer class properties from an anonymous inner class has its complexities. I have always found it more effective that, if you're going to update outer class properties from an anonymous inner class, call a method at the outer class level to do the updating.
Asked: 2013-02-14 02:32:53 +0800
Seen: 58 times
Last updated: Feb 19 '13
Databinding and auto-complete on combobox
Composite component and bind in ZK 6
How to detach / reattach MVVM windows?
Is there a way to resolve view model properties as input to client side javascripts?
How can I synchronize data in a ListBox in MVVM ? [closed]
MVVM Validator: class not found ? [closed]
How to Call Child ViewModel Method from Parent Window? [closed]
Right, great catch, thanks. I could also have used "OuterClass.this" instead of "this" for the "BindUtils.postNotifyChange(null, null, ViewModel.this, "data");" line inside the anonymous inner class.
simulacrum ( 2013-02-19 05:12:18 +0800 )edit