Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / src / widgets / tree / TreeLoader.js
index 0fe32c8..4252de4 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
@@ -161,7 +161,7 @@ paramOrder: 'param1|param2|param'
             }\r
         }\r
         if(this.doPreload(node)){ // preloaded json children\r
-            this.runCallback(callback, scope || node, []);\r
+            this.runCallback(callback, scope || node, [node]);\r
         }else if(this.directFn || this.dataUrl || this.url){\r
             this.requestData(node, callback, scope || node);\r
         }\r
@@ -271,7 +271,7 @@ paramOrder: 'param1|param2|param'
     * Example:<pre><code>\r
 new Ext.tree.TreePanel({\r
     ...\r
-    new Ext.tree.TreeLoader({\r
+    loader: new Ext.tree.TreeLoader({\r
         url: 'dataUrl',\r
         createNode: function(attr) {\r
 //          Allow consolidation consignments to have\r
@@ -280,7 +280,7 @@ new Ext.tree.TreePanel({
                 attr.iconCls = 'x-consol',\r
                 attr.allowDrop = true;\r
             }\r
-            return Ext.tree.TreeLoader.prototype.call(this, attr);\r
+            return Ext.tree.TreeLoader.prototype.createNode.call(this, attr);\r
         }\r
     }),\r
     ...\r
@@ -293,7 +293,7 @@ new Ext.tree.TreePanel({
         if(this.baseAttrs){\r
             Ext.applyIf(attr, this.baseAttrs);\r
         }\r
-        if(this.applyLoader !== false){\r
+        if(this.applyLoader !== false && !attr.loader){\r
             attr.loader = this;\r
         }\r
         if(typeof attr.uiProvider == 'string'){\r