May 24, 2011, 3:50 PM
[CLOSED] Problem opening multiple tabpanels the same time.
I am opening the pages in my TabPanel.
I have a TreePanel with a listner that calls the javascript "loadPageTreeMenu.
When I open a page it takes awhile to load, because it makes searching the database and other things. So far so good.
But if I click a menu item and quickly click on another menu item it opens the first tab and start loading the page normally, but clicking on the second menu item for it to load the first page, usually the last opening and aborting the request first.
How can I make this not happen?
Listener the TreePanel
I have a TreePanel with a listner that calls the javascript "loadPageTreeMenu.
When I open a page it takes awhile to load, because it makes searching the database and other things. So far so good.
But if I click a menu item and quickly click on another menu item it opens the first tab and start loading the page normally, but clicking on the second menu item for it to load the first page, usually the last opening and aborting the request first.
How can I make this not happen?
Listener the TreePanel
<Listeners>
<Click Handler="node.toggle(); if (node.attributes.href) { e.stopEvent(); loadPageTreeMenu(#{TabPanelPages}, node); }" />
</Listeners>
<script type="text/javascript">
var loadPageTreeMenu = function (tabPanel, node) {
var tab = tabPanel.getItem(node.id);
if (!tab) {
tab = tabPanel.add({
id: node.id,
title: node.text,
closable: true,
autoLoad: {
showMask: true,
url: node.attributes.href,
mode: "iframe",
maskMsg: "Carregando " + node.text + "..."
}
});
}
tabPanel.setActiveTab(tab);
}
</script>
Last edited by Daniil; Jun 02, 2011 at 7:16 AM.
Reason: [CLOSED]