-<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
}\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
* 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
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
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
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