cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Sharathmg
Active Contributor
0 Kudos

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

Sharathmg
Active Contributor
0 Kudos

If your query is resolved, please mark as answered.