View Full Version : Using dataURL as a TreePanel config

12 Feb 2010, 6:50 AM
According to the API Docs for TreePanel (http://www.extjs.com/deploy/dev/docs/?class=Ext.tree.TreePanel), the dataURL config option may be used directly in the TreePanel config object. You can see this in the example code on the same place:

var tree = new Ext.tree.TreePanel({
renderTo: 'tree-div',
// auto create TreeLoader
dataUrl: 'get-nodes.php',

});If so, can somebody tell me why this config option is NOT included in the API documentation of the TreePanel class, but only within the TreeLoader's one?

And how a novice like me will understand that TreeLoader will be auto-created? It's quite confusing to me...:(

In the "Learning ExtJS" book, within the Trees chapter, the authors instantiate a TreeLoader object first and then use it with the loader config option of the TreePanel.

Which of these two is better?


12 Feb 2010, 6:57 AM
The volunteer documenters are in the same boat as you.

We have to study the code, see what it does, see what properties from the configuration object are used to do what, and then document that.

So that innovation, of automatically pulling in a dataUrl from the TreePanel's configuration to use when autocreating a TreeLoader has not been noticed and documented.

I can't document it, sadly because they've moved to git, and it won't run on Windows, so some other kind soul must do it.

12 Feb 2010, 7:11 AM
Well, so it's a non-documented feature, not an implicit stuff which i missed because i'm a novice... It is important to me to clarify that.

So far i though that any new Ext Version comes with a up-to-date API docs.

And, to be honest, the fact that the API is made by volunteers was unknown to me.


25 Apr 2010, 1:47 PM
FWIW, this just bit me too. The treepanel API doc shows dataUrl being used in the examples, but then does not mention it in the config properties section. Definitely a little confusing.