softmachine2011
Sep 19, 2012, 3:41 PM
Hi,
With the latest build (rev. 4359) which includes Ext.JS 4.1.2 I found a new bug.
When you open a tab dinamycally, and close it, if you will open a new tab, or close any existing tab it throws an exception.
TEST CASE
<script type="text/javascript">
function openTab(url) {
if (Ext.isEmpty(url, false)) {
return;
}
var tp = Ext.getCmp("sampleTabPanel");
var tabId = url;
var tab = tp.getComponent(tabId);
if (!tab) {
tab = tp.add({
id: tabId,
iconCls: 'icon-colorwheel',
title: 'My Tab',
closable: true,
closeAction: 'close',
loader: {
url: url,
renderer: 'frame',
noCache: true,
loadMask: {
showMask: true,
msg: 'Loading new tab...'
}
}
});
tp.setActiveTab(tab);
tab.addListener('activate', tab.syncSize);
} else {
tp.setActiveTab(tab);
tab.fireEvent('activate');
Ext.get(tab.tab.el).frame();
}
}
</script>
<ext:Button runat="server" Text="Open Tab" Icon="ColorWheel">
<Listeners>
<Click Handler="openTab('/Area/Sample/Detail');" />
</Listeners>
</ext:Button>
<ext:TabPanel ID="sampleTabPanel" runat="server" />
Steps:
1-Open Tab
2-Close Tab
3-Open Tab (it crashes, it says that firing is undefined)
With the latest build (rev. 4359) which includes Ext.JS 4.1.2 I found a new bug.
When you open a tab dinamycally, and close it, if you will open a new tab, or close any existing tab it throws an exception.
TEST CASE
<script type="text/javascript">
function openTab(url) {
if (Ext.isEmpty(url, false)) {
return;
}
var tp = Ext.getCmp("sampleTabPanel");
var tabId = url;
var tab = tp.getComponent(tabId);
if (!tab) {
tab = tp.add({
id: tabId,
iconCls: 'icon-colorwheel',
title: 'My Tab',
closable: true,
closeAction: 'close',
loader: {
url: url,
renderer: 'frame',
noCache: true,
loadMask: {
showMask: true,
msg: 'Loading new tab...'
}
}
});
tp.setActiveTab(tab);
tab.addListener('activate', tab.syncSize);
} else {
tp.setActiveTab(tab);
tab.fireEvent('activate');
Ext.get(tab.tab.el).frame();
}
}
</script>
<ext:Button runat="server" Text="Open Tab" Icon="ColorWheel">
<Listeners>
<Click Handler="openTab('/Area/Sample/Detail');" />
</Listeners>
</ext:Button>
<ext:TabPanel ID="sampleTabPanel" runat="server" />
Steps:
1-Open Tab
2-Close Tab
3-Open Tab (it crashes, it says that firing is undefined)