Author: jmorliaguet Date: Sun Jan 29 15:24:35 2006 New Revision: 2238 Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Log:
- working implementation Modified: cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js ============================================================================== --- cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js (original) +++ cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js Sun Jan 29 15:24:35 2006 @@ -570,6 +570,13 @@ //this.observers = this.observers.without(view); }, + notifyObservers: function(data) { + // XXX: should use notify() instead, but there is no event system. + $H(this.observers).each(function(m) { + m[1].render(data); + }); + }, + _setStorageAdapter: function() { var storage_def = this.def.storage; if (!storage_def) { @@ -638,9 +645,7 @@ onComplete: function(req) { var data = JSON.parse(req.responseText); model.def.data = data; - $H(observers).each(function(m) { - m[1].refresh(); - }); + model.notifyObservers(data); } } new Ajax.Request(url, options); -- http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins