hi ed, sure.
ext 3.4 version:
ext 4 version:Code:reconfigure : function(store, colModel){
var rendered = this.rendered;
if(rendered){
if(this.loadMask){
this.loadMask.destroy();
this.loadMask = new Ext.LoadMask(this.bwrap,
Ext.apply({}, {store:store}, this.initialConfig.loadMask));
}
}
if(this.view){
this.view.initData(store, colModel);
}
this.store = store;
this.colModel = colModel;
if(rendered){
this.view.refresh(true);
}
this.fireEvent('reconfigure', this, store, colModel);
},
so, if you have a column model with:Code:reconfigure: function(store, columns) {
var me = this,
headerCt = me.headerCt;
if (me.lockable) {
me.reconfigureLockable(store, columns);
} else {
if (columns) {
headerCt.suspendLayout = true;
headerCt.removeAll();
headerCt.add(columns);
}
if (store) {
store = Ext.StoreManager.lookup(store);
me.bindStore(store);
} else {
me.getView().refresh();
}
if (columns) {
headerCt.suspendLayout = false;
me.forceComponentLayout();
}
}
me.fireEvent('reconfigure', me);
}
and want to change it toCode:defaults : {
align : 'left',
width : 100
}
you can still do it with applying it to each column manually, but it does not look as clean than before + it was 2 ext instances before. it is like if you would replace the first param store with the fields-array (not even the model :) ).Code:defaults : {
align : 'center',
width : 200
}
so, to not break compatibility i suggest that you make the 2nd param optional: columns / colModel and check if it is an array or not.
best regards
tobi

