PDA

View Full Version : [UNKNOWN][3.??] Tree root showing when created using nodeType async



Allan
24 Jul 2009, 7:23 AM
Hi,

using the column-tree.js example as a basis for my tests:



/*!
* Ext JS Library 3.0.0
* Copyright(c) 2006-2009 Ext JS, LLC
* [email protected]
* http://www.extjs.com/license
*/

/* Modified to get data from url defined in variable url
* the uiProvider is set as baseAttr
*/
Ext.onReady(function(){
var url = 'column-data.json';
var tree1 = new Ext.ux.tree.ColumnTree({
width: 550,
height: 300,
rootVisible:false,
autoScroll:true,
title: 'Example Tasks root created via new()',
renderTo: Ext.getBody(),

columns:[{
header:'Task',
width:330,
dataIndex:'task'
},{
header:'Duration',
width:100,
dataIndex:'duration'
},{
header:'Assigned To',
width:100,
dataIndex:'user'
}],

loader: new Ext.tree.TreeLoader({
dataUrl:url,
requestMethod: 'GET',
baseAttrs: {
uiProvider: 'col'
},
uiProviders:{
'col': Ext.ux.tree.ColumnNodeUI
}
}),
root: new Ext.tree.AsyncTreeNode({
text:'Tasks'
})
});
var tree2 = new Ext.ux.tree.ColumnTree({
width: 550,
height: 300,
rootVisible:false,
autoScroll:true,
title: 'Example Tasks (showing root, nodeType:"async")',
renderTo: Ext.getBody(),

columns:[{
header:'Task',
width:330,
dataIndex:'task'
},{
header:'Duration',
width:100,
dataIndex:'duration'
},{
header:'Assigned To',
width:100,
dataIndex:'user'
}],

loader: new Ext.tree.TreeLoader({
dataUrl:url,
requestMethod: 'GET',
baseAttrs: {
uiProvider: 'col'
},
uiProviders:{
'col': Ext.ux.tree.ColumnNodeUI
}
}),
root: {
nodeType: 'async',
text: 'root',
expanded: true
}
});
});


The root shows in the second example tree.