PDA

View Full Version : Ext.tree.Panel.reconfigure - Can I use this method?



LesJ
6 Nov 2013, 9:48 AM
The Ext.tree.Panel.reconfigure method is not documented, but it appears to work in my light testing.

Can I use this method with confidence?

Ext JS 4.2.2

scottmartin
11 Nov 2013, 1:19 PM
Ext.tree.Panel now inherits from Ext.panel.Table (grid) .. so it should be fine.

Do you see any issues?

Scott.

skirtle
11 Nov 2013, 5:50 PM
Tree panel has extended Table since 4.0 but reconfiguring a tree definitely didn't work with 4.0. However, as Tree inherited the documentation from Table it led to a lot of people trying to reconfigure a Tree with disastrous results.

In 4.1 the documentation for reconfigure was moved to the Grid classes to help avoid confusion but the methods remained on Table.

If 4.2's grid re-write fixed these problems then the docs need updating. However, I'd be surprised if they did, the NodeStore stuff in the tree view is pretty delicate.

Just reconfiguring the columns might work though...

LesJ
18 Nov 2013, 8:07 AM
FYI
I see that there are a few changes in this method in the nightly build - ext-4.2.3.1245

LesJ
13 Mar 2014, 8:41 AM
Ext.tree.Panel now inherits from Ext.panel.Table (grid) .. so it should be fine.

Do you see any issues?

Scott.

I used the reconfigure method on buffered grids... and it works fine using 4.2.2.

If it's indeed possible to reconfigure a tree panel, then I'd update this TODO comment which is still present in 4.2.3.1364.

Ext.define('Ext.tree.Panel', {
extend: 'Ext.panel.Table',
...
// @private
// TODO: Decide whether it is possible to reconfigure a TreePanel.
unbindStore: function() {
var me = this,
store = me.store;


if (store) {
Ext.destroy(me.storeListeners, me.storeRelayers, me.storeRelayers1);
delete store.ownerTree;
}
},
....