Mar 21, 2012, 5:44 PM
[CLOSED] Adding a listener to BeforeDestroy event on TabPanel
Hi!
I create the tabs of my tabPanel with the JavaScript bellow. This javascript create a new tabPanel and load in this new tabPanel a aspx page.
I wish call a directmethod in aspx page loaded in tabPanel when tabPanel was closed... I wish add a listener to BeforeDestroy event, but I know do this in JavaScript...
I think that I should add "listener.beforeDestroy.handle = ''this.getBody().App.direct.MyMethod();"... It's correct?
I create the tabs of my tabPanel with the JavaScript bellow. This javascript create a new tabPanel and load in this new tabPanel a aspx page.
I wish call a directmethod in aspx page loaded in tabPanel when tabPanel was closed... I wish add a listener to BeforeDestroy event, but I know do this in JavaScript...
I think that I should add "listener.beforeDestroy.handle = ''this.getBody().App.direct.MyMethod();"... It's correct?
<script type="text/javascript">
var addTab = function (tabPanel, contextID, Title) {
var tab = tabPanel.getComponent(contextID);
if (!tab) {
tab = tabPanel.add({
id: contextID,
title: Title,
closable: true,
loader: {
url: "/app/tools/explorerweb/explorerweb.aspx?IDSistema=SGE&ContextID=" + contextID,
renderer: "frame",
loadMask: {
showMask: true,
msg: "carregando " + Title + "..."
}
}
});
}
tabPanel.setActiveTab(tab);
};
</script>
Last edited by Daniil; Mar 22, 2012 at 1:30 PM.
Reason: [CLOSED]