Upgrade to ExtJS 3.0.3 - Released 10/11/2009
[extjs.git] / docs / source / TreeLoader.html
index 1b8d156..caff1cc 100644 (file)
@@ -1,11 +1,17 @@
-<html>\r
-<head>\r
-  <title>The source code</title>\r
-    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
-    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
-</head>\r
-<body  onload="prettyPrint();">\r
-    <pre class="prettyprint lang-js"><div id="cls-Ext.tree.TreeLoader"></div>/**\r
+<html>
+<head>
+  <title>The source code</title>
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
+</head>
+<body  onload="prettyPrint();">
+    <pre class="prettyprint lang-js">/*!
+ * Ext JS Library 3.0.3
+ * Copyright(c) 2006-2009 Ext JS, LLC
+ * licensing@extjs.com
+ * http://www.extjs.com/license
+ */
+<div id="cls-Ext.tree.TreeLoader"></div>/**\r
  * @class Ext.tree.TreeLoader\r
  * @extends Ext.util.Observable\r
  * A TreeLoader provides for lazy loading of an {@link Ext.tree.TreeNode}'s child\r
  * @class Ext.tree.TreeLoader\r
  * @extends Ext.util.Observable\r
  * A TreeLoader provides for lazy loading of an {@link Ext.tree.TreeNode}'s child\r
@@ -162,7 +168,7 @@ paramOrder: 'param1|param2|param'
             }\r
         }\r
         if(this.doPreload(node)){ // preloaded json children\r
             }\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
         }else if(this.directFn || this.dataUrl || this.url){\r
             this.requestData(node, callback, scope || node);\r
         }\r
@@ -272,7 +278,7 @@ paramOrder: 'param1|param2|param'
     * Example:<pre><code>\r
 new Ext.tree.TreePanel({\r
     ...\r
     * 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
         url: 'dataUrl',\r
         createNode: function(attr) {\r
 //          Allow consolidation consignments to have\r
@@ -281,7 +287,7 @@ new Ext.tree.TreePanel({
                 attr.iconCls = 'x-consol',\r
                 attr.allowDrop = true;\r
             }\r
                 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
         }\r
     }),\r
     ...\r
@@ -294,7 +300,7 @@ new Ext.tree.TreePanel({
         if(this.baseAttrs){\r
             Ext.applyIf(attr, this.baseAttrs);\r
         }\r
         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
             attr.loader = this;\r
         }\r
         if(typeof attr.uiProvider == 'string'){\r
@@ -340,6 +346,6 @@ new Ext.tree.TreePanel({
         this.fireEvent("loadexception", this, a.node, response);\r
         this.runCallback(a.callback, a.scope || a.node, [a.node]);\r
     }\r
         this.fireEvent("loadexception", this, a.node, response);\r
         this.runCallback(a.callback, a.scope || a.node, [a.node]);\r
     }\r
-});</pre>    \r
-</body>\r
+});</pre>
+</body>
 </html>
\ No newline at end of file
 </html>
\ No newline at end of file