[CLOSED] Closing twice a window inside another doesn't work

  1. #1

    [CLOSED] Closing twice a window inside another doesn't work

    Hi.
    I am opening a new dynamic window from client code inside another one.

    I open a window with a list of countries inside the Desktop. It has an Add button that opens another window inside it.

               var mWin = new Ext.Window({
                id: mNombre,
                title:pTitulo,
                width:mAncho,
                height:mAlto,
                modal: pModal,
                autoLoad: {
                    showMask: true,
                    url: 'CountryAdd.aspx',
                    mode: 'iframe',
                    maskMsg: 'Loading...'
                }
                })
                
                mWin.show();
    It opens ok. Then I click the closing 'x' and the window closes, but when I open it again, it can't be closed anymore. The closing 'x' stops working. No error or effect are shown at all.

    It doesn't matter I open it as modal or not.

    If I open that window also in the Desktop (not inside country list), the closing 'x' works well as many times as desired.

    Thanks
    Regards
    Fernando
    Last edited by Daniil; Nov 29, 2011 at 6:10 AM. Reason: [CLOSED]
  2. #2
    Hi,

    By default, a Window's closeAction is "hide" in Ext.Net.
    http://docs.sencha.com/ext-js/3-4/#!...fg-closeAction

    So, a Window is not destroyed after closing and you, I guess, create a Window again with the same id => ids conflict.

    You should check a Window on existing before creating
    var win = Ext.getCmp("windowId");
    if (!win) {
        win = new Ext.Window({
            id : "windowId",
            ...
        });
    }
    win.show();
    or set up
    closeAction : "close"
    in a Window's config.
  3. #3

    Resolved, thanks

    CloseAction worked fine.
    Thanks Daniil !
    Regards
    Fernando

Similar Threads

  1. Replies: 2
    Last Post: Mar 03, 2011, 1:44 PM
  2. [CLOSED] [1.0] HtmlEditor in Window doesn't work with Portal
    By jchau in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: May 12, 2010, 2:38 PM
  3. Replies: 6
    Last Post: Feb 15, 2010, 9:15 AM
  4. EventMask doesn't work in ext:window
    By Martyrian in forum 1.x Help
    Replies: 4
    Last Post: Oct 02, 2009, 4:52 AM
  5. Replies: 2
    Last Post: Mar 26, 2008, 9:41 AM

Tags for this Thread

Posting Permissions