cancel
Showing results for 
Search instead for 
Did you mean: 

Close an External Windoe

Former Member
0 Kudos

Hi Colleagues,

Here in our requirement we have two Webdynpro applications

From the rist webdynpro application, i am calling second webdynpro application using

IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(urlToTargetApp);

window.show();

And the second application contains a Close button

Could any one pplease let me know how can i close this second window (in my second webdynpro application)

Manythanks & Regards

Swetha

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Swetha,

Create a context attribute named "WindowInstance" in component controller and change the type to com.sap.tc.webdynpro.services.session.api.IWDWindow. Map it to both your views.

Now store the instance of window in this context attribute.


IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(urlToTargetApp);
wdContext.currentContextElement().setWindowInstance(window);

When you click on the close button in the view2 then execute


IWDWindow windowInstance = wdContext.currentContextElement().getWindowInstance();
windowInstance.destroyInstance();

Regards,

Jaya.

Former Member
0 Kudos

hi

Please try this ;

IWDWindow win=wdContext.currentContextElement().getWindowInstance();

win.destroy();

Thanks

Ritushree

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Try this code,

IWDWindow window=wdContext.currentContextElement().getWindowInstance();

window.destroy();

or

window.close();

or

window.destroyInstance();

Regards,

sunaina Reddy T

Former Member
0 Kudos

Hi Swetha

please check this link.This link is similar to your req.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-tec...

Regards

Ruturaj

Former Member
0 Kudos

Hi Swetha

Check out this link you will get solution

Thanks

Tulasi