View Full Version : Working with Windows components

25 Mar 2014, 10:31 AM
What is the proper way of using Windows components ?

I include the Window component into the views config of the controller as such:

Ext.define('App.controller.MyController', {
extend: 'Ext.app.Controller',
views: [ 'MyWindow' ],

refs: [{ ref: 'myWindow',
selector: 'mywindow'

init: function(){
'useredit button[action=save]': {
click: function(){
this.getMyWindow().show(); // this will return undefined, why? I included it in the views cfg
Ext.createWidget('mywindow').show(); // do I have to create it every time ?

I also need a refference to use it later. And I would like not to destroy them each time.

Thank you very much