Skip to Content
0

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

Apr 27, 2017 at 10:54 AM

60

avatar image

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........

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Sharath M G May 06, 2017 at 08:23 PM
0

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.

Regards,

Sharath

Show 1 Share
10 |10000 characters needed characters left characters exceeded

If your query is resolved, please mark as answered.

0