PDA

View Full Version : [OPEN] [FIXED-234][svn r5315] Lots of problems with components that have itemId set



stever
10 Sep 2009, 9:12 AM
Test case:


win = new Ext.Window({
height:400,
width: 500,
layout:'fit',
items: [{
xtype:'tabpanel',
activeItem:'test1',
items:[{
title:'test1',
itemId:'test1',
html:'test1'
},{
title:'test2',
itemId:'test2',
html:'test2'
}]
}]
}).show()


First of all, the map for items is set by itemId, not id, if it is available. So the container should look more like this:


getComponent : function(comp){
if(Ext.isObject(comp)){
comp = comp.getItemId();
}
return this.items.get(comp);
}

Once you get that working, then try closing the window. The onRemove will try using getTabEl(comp), and that comp is no longer in the items.map and stuff starts failing. So better care needs to be taken in the remove and destroy code to get things working again.

evant
10 Sep 2009, 3:55 PM
Fix applied to svn in rev #5323 for patch release 3.0.2.

stever
10 Sep 2009, 5:21 PM
Thanks!