Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / src / data / ScriptTagProxy.js
index b44d355..cddb3b3 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * Ext JS Library 3.0.0
+ * Ext JS Library 3.0.3
  * Copyright(c) 2006-2009 Ext JS, LLC
  * licensing@extjs.com
  * http://www.extjs.com/license
@@ -202,23 +202,23 @@ Ext.extend(Ext.data.ScriptTagProxy, Ext.data.DataProxy, {
      * @param {Object} res The server response\r
      * @private\r
      */\r
-    onWrite : function(action, trans, res, rs) {\r
+    onWrite : function(action, trans, response, rs) {\r
         var reader = trans.reader;\r
         try {\r
             // though we already have a response object here in STP, run through readResponse to catch any meta-data exceptions.\r
-            reader.readResponse(action, res);\r
+            var res = reader.readResponse(action, response);\r
         } catch (e) {\r
             this.fireEvent('exception', this, 'response', action, trans, res, e);\r
             trans.callback.call(trans.scope||window, null, res, false);\r
             return;\r
         }\r
-        if(!res[reader.meta.successProperty] === true){\r
+        if(!res.success === true){\r
             this.fireEvent('exception', this, 'remote', action, trans, res, rs);\r
             trans.callback.call(trans.scope||window, null, res, false);\r
             return;\r
         }\r
-        this.fireEvent("write", this, action, res[reader.meta.root], res, rs, trans.arg );\r
-        trans.callback.call(trans.scope||window, res[reader.meta.root], res, true);\r
+        this.fireEvent("write", this, action, res.data, res, rs, trans.arg );\r
+        trans.callback.call(trans.scope||window, res.data, res, true);\r
     },\r
 \r
     // private\r