Jul 20, 2012, 9:59 AM
[CLOSED] Ext.NET Window Override
Hi,
When I create a dynamic window with closeAction='destroy' or call to method destroy() of a window in ext.net v2.x it throws me a null reference exception in js side.
I saw that there is this function that makes an override of extjs base functionallity
How can I reproduce it for you to have a test example? When is iframe property deleted?
When I create a dynamic window with closeAction='destroy' or call to method destroy() of a window in ext.net v2.x it throws me a null reference exception in js side.
I saw that there is this function that makes an override of extjs base functionallity
// @source core/container/Container.js
Ext.Container.override({
...
onIFrameRelayedEvent: function (event) {
var iframeEl = this.iframe, //Here for some reason iframe doesn't exists. this.iframe=undefined
iframeXY = iframeEl.getXY(),
eventXY = event.getXY();
event.xy = [iframeXY[0] + eventXY[0], iframeXY[1] + eventXY[1]];
event.injectEvent(iframeEl);
event.xy = eventXY;
}
...
});
This is how I open the windows:var w = Ext.create("Ext.window.Window", {
closeAction: "destroy",
renderTo: Ext.getBody(),
title: 'window title',
itemID: 'sampleID',
itemDetailChanged: false,
modal: false,
resizable: true,
maximizable: false,
minimizable: false,
collapsible: false,
draggable: true,
isMinimized: false,
isMaximized: false,
minimizePosition: -1,
originalWidth: 500,
originalHeight: 500,
restoreTop: undefined,
restoreLeft: undefined,
minWidth: 500,
minHeight: 500,
width: 500,
height: 500,
isModal: false,
constrain: true,
items: [{
xtype: "netlabel",
text: "Sample"
}],
directEvents: {
hide: {
fn: function (el) {
debugger;
},
delay: 20
}
}
});
if (!Ext.isEmpty(w.parentTab))
w.parentTab.anyDetailOpened = true;
w.on("beforehide", function () {
if (w.mandatoryClose == true)
return true;
var allowClose = true;
try {
if (!Ext.isEmpty(w.onClose))
allowClose = w.onClose(w, MyApp.Windows.applyClose);
} catch (ex) {
//No se puede ejecutar una funcion de una ventana ya cerrada
}
return (allowClose);
});
if (w.isModal) {
w.tools["minimize"].hide();
w.tools["maximize"].hide();
}
w.show();
But in a sample project doesn't crash me.How can I reproduce it for you to have a test example? When is iframe property deleted?
Last edited by Daniil; Jul 23, 2012 at 2:30 PM.
Reason: [CLOSED]