I am using extjs 3.4
I would like to have preselected node when treepanel first loads. In my example this would be second node. Same thing as mouse click on that node - just it happens by default on selected node. So, how can I simulate mouse click on second node? (or just make it active item by default)
Ext.ns('App.Misc.West');
App.Misc.West.View = Ext.extend(Ext.Panel, {
constructor: function (config) {
var me = this;
var cfg = {
items: [{
xtype: 'treepanel',
ref: 'treeMisc',
id: 'treeMisc',
root: new Ext.tree.AsyncTreeNode({
expanded: true,
text: 'Data tables',
children: [{
text: 'Books',
bookTitle: 'Books',
leaf: true
}, {
text: 'Cars',
bookTitle: 'Cars',
leaf: true
}]
}),
rootVisible: true
}]
};
Ext.apply(cfg, config);
App.Misc.West.View.superclass.constructor.call(me, cfg);
}
});