The Microsoft AJAX 4.0 preview includes this Sys.Observer class that allows you to be notified of updates to POJO’s, provided you use its APIs to modify them.
Sys.Observer provides a mechanism for registering (and de-registering) listeners to be notified when values change in the object:
- Sys.Observer.addPropertyChanged(objectToObserve, callbackFunction);
However, you must use Sys.Observer to make changes to the objects being observed:
- Sys.Observer.setValue(objectToServe, "property", "newValue");
Alternatively, you can have the framework add a setValue() function directly to the object being observed:
See the full article for more details.
Posted by Ben Galbraith at 7:00 am