Desktop and UI Extensibility

Get Involved. Join the Conversation.

Topic

    Sathya Rajendran
    BUI: Close Popup Window
    Topic posted December 5, 2018 by Sathya RajendranSilver Medal: 2,000+ Points 
    5 Views, 4 Comments
    Title:
    BUI: Close Popup Window
    Content:

    Hello all,

    I have create one IpopupWindow, after i perform some operation in that popup i have to close the popup, Is here any function to close the created popup.

    Comment

     

    • abdelali bendaoudi

      Hi sathya

      Please check the following documentation related to the IPopupWindow object.

      http://documentation.custhelp.com/euf/assets/devdocs/unversioned/BUI_Extensibility/topicrefs/IPopupWindow.html#IPopupWindow-91582B40__Close-915D3828

      You will find what you want.

      Regards

      Abdelali

    • Sathya Rajendran

      Hello abdelali,

      Thanks for your response.

      Below is the function for close, But it does not close the function instead we can do some operation on the popupclose.

       

      ORACLE_SERVICE_CLOUD.extension_loader.load("CUSTOM_APP_ID" , "1")
      .then(function(extensionProvider)
              {
              extensionProvider.registerUserInterfaceExtension(function(IUserInterfaceContext)
                      {
                      IUserInterfaceContext.getPopupWindowContext().then(function(IPopupWindowContext)
                              {
                              let IPopupWindow = IPopupWindowContext.createPopupWindow('myFirstPopupWindow');
                              IPopupWindow.setContentUrl("http://example.com");
                              IPopupWindow.setHeight('200px');
                              IPopupWindow.setWidth('200px');
                              IPopupWindow.render();
                              IPopupWindow.close().then(function(closedPopupWindow)
                                      {
                                      // Perform some operations on closedPopupWindow.
                                      });
                              });
                      });
              });
      

      But i need to close the popup without click the popupclose.

      • abdelali bendaoudi

        Hi Sathya

        In your logic ( operations you performed once the popup is displayed ) you have to identify one event or variable to set that will act as a trigger to close the window.

        What do display in your popup ? Fields or button ? a click on that button could be a trigger to close that popup...

         

        Regards

        Abdelali

    • Sathya Rajendran

      Hello Abdelali,

      I closed my popup with the below code on the button click of the popup.

      ORACLE_SERVICE_CLOUD.extension_loader.load(appName , appVersion)
                                                          .then(function(extensionProvider)
                                                              {
                                                              extensionProvider.registerUserInterfaceExtension(function(userInterfaceContext)
                                                                  {
                                                                  userInterfaceContext.getPopupWindowContext().then(function(popupWindowContext)
                                                                      {
                                                                          var popupWindows;
                                                                      popupWindowContext.getCurrentPopupWindows().then(function(currentPopupWindows)
                                                                          {
                                                                          popupWindows = currentPopupWindows;
                                                                          
                                                                          popupWindows[0].close();
                                                                          // Perform some operations on popupWindows.
                                                                          });
                                                                      });
                                                                  });
                                                              });

      Did you have any idea to close the content pane because i did not found any function to close for IContentpane.