9

Close problems window in gwt -ext

 2 years ago
source link: https://www.codesd.com/item/close-problems-window-in-gwt-ext.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Close problems window in gwt -ext

advertisements

Hello all I am using gwt-ext in my application.In that application session time is 5 minutes. My issues is that If any window is open to render some information & in between session goes out then user logged out but the opened window is not closing in that case.

So just want to know that how close opened window while session is timed out and user is logged out.

Thanks in advance.


You can follow these steps to close tour any open window at sesssion time out:

  1. Whenever you make an Object of Window: assign an Id to that Window.

    window.setId("myWindow");
    
    
  2. The place at which you're handling session time out, place this code:

    ExtElement extElement = Ext.get("myWindow");
    if (extElement != null && Ext.getCmp(extElement) != null
        && Ext.getCmp(extElement) instanceof Window) {
        Window window = (Window) Ext.getCmp(extElement);
        window.close();
    }
    
    

Related Articles

File close problem windows

We are using File.WriteAllBytes to write data to the disk. But if a reboot happens just about the time when we close the file, windows adds null to the file. This seems to be happening on Windows 7. So once we come back to the file we see nulls in th

ExtJS3.4: close the window automatically after a few seconds

I've read many posts about this but still settimeout doesn't work. I suspect it's because of the "this" in the code, and probably because of local/global variable scope. How can I set correctly settimeout to close after 3 seconds the ext.window?

EXC_BAD_ACCESS when I close my window, which is also the delegate of my application

I wrote a Cocoa Application and I got EXC_BAD_ACCESS error when I'm closing an application window. I read that this error usually means problems with memory, but I have ARC mode on and I don't need care about releasing e.t.c. (xCode forbids me to cal

Downloading the gwt-ext file

I am trying to do a file upload from gwt-ext without bringing up the dialog box. To do this, I created a FormPanel and added the appropriate fields to it. Then did a form.submit(). This doesn't seem to work. Any idea why? The code is shown below. fin

GWT-EXT xml tree error

i am new to GWT GWT-EXT and i mimic it's demo the problem is where i should put xml file final TreePanel treePanel = new TreePanel() { { setAnimate(true); setEnableDD(true); setContainerScroll(true); setRootVisible(true); } }; final XMLTreeLoader loa

HtmlUnit closes all Windows memory leak

HtmlUnit does not appears to close windows in the webclient and thus creating a memory leak. I am trying to get a page with HtmlUnit and pass it off to JSoup for parsing. I am aware that JSoup can connect to a page but I need to use this approach as

ExtJS how to close a window of another function inside the controller

In my controller (ExtJS 4.2.1) I have a function where I create a window like this: refs: [{ ref: 'holidayView', selector: '[xtype=holiday.view]' }], init: function (application) { this.control({ '[xtype=holiday.view] button#btnPrint': { click: me.on

How to completely close the window in qt?

I am creating a game using C++ and Qt Creator. When my health gets below zero, I want to quit the current application and show a different screen that displays quit or play again. I can do this by using the hide() method and then showing the new scre

The webpage you are viewing is trying to close this window in Internet Explorer

i have a login page and if login is sucessfull,i open a homepage as popup.In IE 6.0,i dont come across a problem but IE.7.0 shows me an alert "The webpage you are viewing is trying to close this window.Do you want to close the window?".When i ad

How can I check if a file is saved when the user tries to close the window button?

I have a couple of classes but I am only posting this Main class I have. Most of this code was taken from my professor's sample program. My problem is I want to run a check ONCE the window button is closed. The 'check' is going to see if a Boolean va

Can Javascript close a window when a file finishes downloading to a server?

Currently I am making a POST to our server, and I would like to be able to close the window.open popup after the file finishes uploading. Right now, I am using: setTimeout(function() { imageUploadWindow.close(); }, 5000); However, this introduces a t

How to detect the closing of the window from the right click & gt; Close the window?

Is there an event that gets fired when somebody closes a desktop-based Java/JavaFx application from the task bar (and not directly from the application itself) by right clicking on the application and executing Close Window? Currently, if I close the

How to close a window using jquery

how to close a window using jquery for all browser compatibility? <input type="button" name="backButton" value="Close" style="background-color:#245f91; color:#fff;font-weight:bold;" onclick="window.close();&

How to close a window just opened with JQuery per click?

I can now open a picture in the original size in a new pop-up window, but I want to be able to close it by clicking it. This is how I open it: function bigger(service) { var image = window.open(service, 'image', 'width=510,height=470,menubar=0,scroll

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK