Hello Friends,
I have created webdesktop architecture in MVC structure. But I have problem when open more than one window and open previous opened window, I can not navigate the page after then. But newly open window is works fine.
Here is the sample code for created MVC:
app.js
Code:
Ext.Loader.setConfig({
enabled: true,
paths: {
'Ext.ux.desktop': 'lib/js'
}
});
Ext.application({
name: 'Mydesktop',
controllers: ['Mydesktop']
});
And from Mydesktop view I have set the webdesktop architecture. and all window opens from it.
After window open I have created new MVC for my real application
Code:
createWindow: function () {
var desktop = this.app.getDesktop();
var win = desktop.getWindow('one-win');
if (!win) {
Ext.application({
name: 'Mydesktop',
appFolder: 'app',
controllers: [
"layout.SampleOne"
],
launch: function () {
if (Ext.getCmp('one-win'))
Ext.getCmp('one-win').destroy();
win = desktop.createWindow({
id: 'one-win',
title: 'SampleOne',
maximized: true,
//modal: true,
width: 740,
height: 480,
border: false,
y: 0,
autoHeight: true,
resizable: true,
iconCls: 'icon-grid',
//animCollapse: false,
//constrainHeader: true,
layout: 'anchor',
items: [{
layout: 'anchor',
xtype: 'sampleone'
}],
listeners: {
resize: function (t, w, h, ow, oh) {
}
}
});
win.show();
}
});
}
return win;
}
I also attached my sample code here. Please let me know if anyone knows how to handle MVC in webdesktop archtecture.
Thanks in advance