View Full Version : Web Desktop issues when navigate in windows

21 Jan 2013, 4:45 AM
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:

enabled: true,
paths: {
'Ext.ux.desktop': 'lib/js'

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

createWindow: function () {

var desktop = this.app.getDesktop();
var win = desktop.getWindow('one-win');

if (!win) {
name: 'Mydesktop',
appFolder: 'app',
controllers: [
launch: function () {
if (Ext.getCmp('one-win'))
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) {

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 :)

10 Mar 2013, 11:59 PM
For others which may have same issue:
Just load view file using required. And in controller, when load this view load respective controller using getController.

win = desktop.createWindow({
id : 'admin-win',
title : 'Administration'.l('SC30000'),
maximized : true,
width : 740,
height : 480,
border : false,
y : 0,
autoHeight : true,
resizable : true,
iconCls : 'icon-administration',
layout : 'fit',
items : [{
layout : 'fit',
xtype: 'administration'

When administration view load, then do afterrender event on parent controller and load controller of administration.

administration : {
afterrender : function (e, n, r, i) {
var s = t.getController("layout.Administration");

Its work for me, hope for others as well. Let me know if any difficulty on it.