PDA

View Full Version : can't find config items in docs



Steve Murphy
5 Nov 2009, 10:02 AM
In the example for TreePanel, it shows:


root: {
nodeType: 'async',
text: 'Ext JS',
draggable: false,
id: 'source'
}

and later....



root: new Ext.tree.AsyncTreeNode({
expanded: true,
children: [{
text: 'Menu Option 1',
leaf: true
}, {
I am having problems finding info on the following two config options:

nodeType
children

Does anyone know where to look?

Animal
5 Nov 2009, 10:40 AM
Yes, they aren't there. They are not strictly configs of TreeNode, or AsyncTreeNode.

They are used by the TreeLoader when creating a node from JSON retrieved from its configured url, or when creating a node from a passed in configuration object.


nodeType
The JSON can specify whether it is to result in the creation of a TreeNode (all children contained within its JSON and no further reading from server), or an AsyncTreeNode (The default which means that it will attempt to load its children from the server at the time you expand it)

children
The Loader uses the children property to create and append child nodes.

I'll have to think about how and where to document this stuff.