سؤال

We are trying to prevent unnecessary rendering and therefor just want to hide and show a window containing a quite huge grid.

The window itself is constrained to the viewport by calling

App.Instance.getViewPort().add(scope.myWindowRef = Ext.create('Ext.Window'),{ 
    constrainHeader: true 
    /* and the rest of the cfg */ 
});
scope.myWindowRef.on('close',function(win){ win.hide(); win.caller.enable(); return false; });

We have a button listeners inside the controller which should now show an hide window

onOpenWin: function(button) {
    button.disable();
    var scope = this,
        win = scope.myWindowRef;
    win.caller = button;
    win.show();
}
هل كانت مفيدة؟

المحلول

You should use the beforeclose event when you want to stop the destruction of the window. The close event is already to late!

نصائح أخرى

check out closeAction config - closeAction:'hide' should do..

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top