Ext.define('saas.view.core.window.Controller', { extend: 'Ext.app.ViewController', alias: 'controller.core-win-controller', init: function() { try { var me = this, win = me.getView(), viewType = win.viewType, viewConfig = win.viewConfig; var view = { xtype: viewType }; Ext.apply(view, viewConfig); win.add(view); }catch(e) { console.error(e); } }, closeWin: function() { var win = this.getView(); win.close(); } });