PDA

View Full Version : TreeStore append listener not being passed tree object?



brendanjohnston
16 Jun 2011, 7:53 AM
According to the documentation, one's TreeStore's append listener should expect the first argument to be a tree object.

The following example works for me, if I omit the tree argument.

I'm using 4.0.2.

Thanks,

Brendan


MyApp.TreeStore = Ext.extend(Ext.data.TreeStore, {

constructor: function () {

MyApp.TreeStore.superclass.constructor.call(this, {

proxy: {
type: 'ajax',
url: 'tree.php'
},
root: {
id: 'id',
text: 'text',
checked: true,
expanded: true
},
fields: [
{name: 'attr1'},
{name: 'attr2'}
],
listeners: {
append: function (parent, node, index, options) {
}
}
});
}
});