abcdef
20 Nov 2011, 9:33 PM
My custom window:
Ext.define('MyApp.window.Window' ,{
extend: 'Ext.window.Window',
alias: 'widget.myappwindow',
componentCls: 'myapp-window',
modal: true,
width: 400,
height: 150,
layout: {
type: 'hbox',
align: 'top'
},
items: [
{
xtype: 'container',
cls: 'body-icon'
},
{
xtype: 'container',
itemId: 'message',
cls: 'body-message',
flex: 1
}
],
dockedItems: [{
xtype: 'toolbar',
dock: 'bottom',
height: 35,
layout: {
pack: 'center'
},
defaults: {
minWidth: 60,
margin: '0 2 0 2'
}
}],
initComponent: function() {
var me = this;
me.initConfig();
me.callParent(arguments);
return me;
}
});
In one of my controller methods, I am doing this:
Ext.create('MyApp.window.Window').show();
Works fine the first time; every other time, I get the following error in console:
NOT_FOUND_ERR: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
What I'd like to do is to create a new window every single time the control flows into this method. close() destroys the window by default.
Please help!
Ext.define('MyApp.window.Window' ,{
extend: 'Ext.window.Window',
alias: 'widget.myappwindow',
componentCls: 'myapp-window',
modal: true,
width: 400,
height: 150,
layout: {
type: 'hbox',
align: 'top'
},
items: [
{
xtype: 'container',
cls: 'body-icon'
},
{
xtype: 'container',
itemId: 'message',
cls: 'body-message',
flex: 1
}
],
dockedItems: [{
xtype: 'toolbar',
dock: 'bottom',
height: 35,
layout: {
pack: 'center'
},
defaults: {
minWidth: 60,
margin: '0 2 0 2'
}
}],
initComponent: function() {
var me = this;
me.initConfig();
me.callParent(arguments);
return me;
}
});
In one of my controller methods, I am doing this:
Ext.create('MyApp.window.Window').show();
Works fine the first time; every other time, I get the following error in console:
NOT_FOUND_ERR: DOM Exception 8: An attempt was made to reference a Node in a context where it does not exist.
What I'd like to do is to create a new window every single time the control flows into this method. close() destroys the window by default.
Please help!