Skip to Content

What code should be written to close the popup window in webdynpro,NWDS

Hi experts,

Initially I created a view containing a textview, button. Clicking on the button gives a popup window with a text, close button. For the close button, I wrote the following code...

  1. IWDWindow window = wdContext.currentPopupElement().get<attribute>();
  2. // close the window
  3. window.destroyInstance();

currentPopupElement() is showing error, recommending currentContextElement(). ...,what is the attribute value refer to? Are we needed to create this in base view or in the popup view...

please clarify my doubt...If it is not the correct procedure, guide me the right one........

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 06, 2017 at 08:23 PM

    In the base view, maintain a context variable where you save the window instance variable.

    Map and share the context between main window and popup window i.e. now the window context variable in main window is mapped to a window context variable in the popup window.

    In the popup window, button close - action, get the context variable value and execute the destroy instance method. This will close the popup.



    Add comment
    10|10000 characters needed characters exceeded