[CLOSED] Desktop window close dynamically

  1. #1

    [CLOSED] Desktop window close dynamically

    Hi Sir,

    I'm opening or launch window dynamically using belowcode.

    App.Desktop1.getModule(windowid).createWindow()

    But I have requirement before launching the window I need to close the window if already exists or close all the windows if any active window.

    Can you please give me piece of code to close desktop window.


    Thank you,
    Vamsi.
    Last edited by fabricio.murta; Feb 03, 2021 at 1:01 AM.
  2. #2
    Hello Vamsi!

    Simply give the window an Id. Then

    if (App.DynWindow1 !== undefined) {
      App.DynWindow1.close(); // use also .destroy() in case you specify a closeAction different than 'destroy'
    }
    
    App.Desktop1.getModule(windowid).createWindow()
    Notice here windowid you are using is the module ID. You shouldn't wipe the module, but its window! So give the window an ID different than module's and check/close/destroy it instead of the module.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hi Sir,

    Thank you for the update..but no luck I have tried your code.

    Even I tried using below code.. I can able to close but Not opening window as expected.

    Ext.WindowMgr.each(function (w) {
    if (w.xtype == "window") {
    if (w.isVisible()) {

    w.close();
    }
    }
    )};

    Here is my requirement:

    When User click on refresh view button then Close all the windows which is already before opening new windows dynamically.

    App.Desktop1.getModule("Moduleid").createWindow().

    One more issue We cannot close the window even in example5.3 ext.net

    https://examples5.ext.net/#/Desktop/...tion/Overview/

    Open WhatsNew desktop module window then try to close using close button then again open same window you can find the issue.

    Thank you,
    Vamsi.
    Attached Thumbnails Click image for larger version. 

Name:	Desktp[.jpg 
Views:	64 
Size:	86.9 KB 
ID:	25502  
  4. #4
    Hello @Vamsi

    You already reported this issue in Desktop-window-when-data-loads-to-content-region. We already provided an work around, so please refer to that thread.

    Hope this helps.
    Fabrício Murta
    Developer & Support Expert
  5. #5
    Resolved..please close this thread.

    Thank you.
  6. #6
    Glad you could resolve the issue, thanks for the feedback!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] Desktop quickStart menu stuck after close dialog window
    By susanz in forum 4.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 17, 2020, 1:04 AM
  2. [CLOSED] V2.1 Desktop Window Close and Move
    By Aurelio in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Nov 17, 2012, 1:13 AM
  3. [CLOSED] Desktop window close button on toolbar
    By llusetti in forum 1.x Legacy Premium Help
    Replies: 15
    Last Post: Jun 08, 2010, 6:41 PM
  4. Desktop window Close
    By Richardt in forum 1.x Help
    Replies: 1
    Last Post: Aug 25, 2009, 5:11 PM
  5. Replies: 4
    Last Post: Jun 03, 2009, 5:24 PM

Posting Permissions