Author: jmorliaguet
Date: Sat Feb  4 14:22:04 2006
New Revision: 2284

Modified:
   cpsskins/branches/jmo-perspectives/ui/framework/cpsskins.js
Log:

- the data in compound storages now gets merged correctly.
 
  the merge is event-driven since the data may be stored asynchronously.



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 Sat Feb  4 
14:22:04 2006
@@ -770,17 +770,16 @@
     });
     this.models = models;
 
+    // merge the data from all storages
     CPSSkins.registerEventHandler('stored', storage, function(event) {
-      var target = event.target;
-      var subscriber = event.subscriber;
-      var model = subscriber.model;
-      storage.merge(target.model.def.data);
+      event.subscriber.merge(event.target.model.def.data);
     });
 
   },
 
   requestData: function() {
     var model = this.model;
+    this.write({});
     $A(this.models).each(function(m) {
       m.storage.requestData();
     });
-- 
http://lists.nuxeo.com/mailman/listinfo/z3lab-checkins

Reply via email to