[CLOSED] Find Notification Dialogs

  1. #1

    [CLOSED] Find Notification Dialogs

    I have a panel with a various fields. One is a user name with a vCard icon next to it as a button. When I click on the icon I show a Notification dialog with User Information displayed. I defined the following attributes on the notification HideDelay of 5000ms, ShowPin is true, PinEvent = 'clicked'. The user may bring up the notification and click on it, thus pinning the window. The notification is not modal.

    My question is how can I find all the notification windows and close them via code? The reason is if the user pinned the notification window and then clicks somewhere else in the application I need to close the notification because it will have nothing to do with other parts of the system.

    One easy fix would be to make the notification modal.
  2. #2
    You can find all notifications windwows via
    Ext.ComponentQuery.query("window[cls~=' x-notification']")
  3. #3
    Is there an equivalent for behind code?
  4. #4
    No, notifications are absent on the server side. Do you need all notifications or particular only?
    You can always to set ID to notification and use GetCmp to destroy it from code behind
    X.GetCmp<Window>("Notification1").Close();
  5. #5
    I just need a particular notification window based on ID. So the following code works when the notification exists:

    X.GetCmp<Window>("Notification1").Close();
    But how can I test if X.GetCmp<Window>("Notification1") exists before trying to close it? Otherwise the code hangs.
  6. #6
    Just create javascript code
    function closeNotification(id)
    {
        var cmp = Ext.getCmp(id);
       if (cmp) {
          cmp.close();
       }
    }
    and call on the server side
    X.Js.Call("closeNotification", "Notification1");
  7. #7
    Perfect, thanks for the solution. Please close the thread.

Similar Threads

  1. [CLOSED] find control
    By rnfigueira in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 12, 2011, 6:29 PM
  2. [CLOSED] Ext.net.Notification Icon
    By peter.campbell in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jun 08, 2011, 10:55 AM
  3. [CLOSED] Notification window
    By majestic in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 18, 2011, 12:16 PM
  4. [CLOSED] Notification isue
    By majestic in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Dec 13, 2010, 11:03 AM
  5. [CLOSED] Docs for Ext.net.Notification
    By randy85253 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Mar 17, 2010, 10:26 AM

Posting Permissions