cancel
Showing results for 
Search instead for 
Did you mean: 

Window can not close.........

Former Member
0 Kudos

Hi,

I created link to action ui element in table column. When i click on that it will display new pop up window .Which is actully a window with iframe . This ifram containing other application.

Now when i close this window the view close but windows reamains as it is pls provide solution for it.

Regards,

Gurprit Bhatia

Edited by: GURPRIT BHATIA on Feb 21, 2008 7:12 AM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Gurprit,

Use window.destroyInstance() for closing the window. Apart from that make sure that while creating the instance , u take that window instance in ur context. While destroying also, u need to use the same instance.

regards

Sumit

Former Member
0 Kudos

Hi Sumit,

I am not using window instance my code for creating window is like this.....

IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("Iframe");

IWDWindow window = wdThis.wdGetAPI().getComponent().getWindowManager().createWindow(windowInfo, true);

window.setWindowPosition(WDWindowPos.CENTER);

window.setWindowSize(300,250);

window.open();

wdContext.currentContextElement().setWindow(window);

Regards,

Gurprit Bhatia

Former Member
0 Kudos

Hi Gurprit ,

I was telling the same thing.U r setting the window instance to the context using "wdContext.currentContextElement().setWindow(window);" . I hope ur context is mapped to ur view (the view which u r using in ur Iframe window).

There u can access the same window instance

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

win.destroyInstance(); //for closing the window.

regards

Sumit

Former Member
0 Kudos

Hi Sumit Thanks for speedy answer,

My code for close window is like........

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

window.close();

window.destroy();

But i can not find destroyInstance method for window object.

Regards,

Gurrpit Bhatia

Former Member
0 Kudos

hi,

Can you post the version of the NWDS?

Regards

Ayyapparaj

Former Member
0 Kudos

Hi Ayyapparaj

SAP NetWeaver Developer Studio

Version: 2.0.9

Build id: 200411030238

Regards,

Gurprit Bhatia

Former Member
Former Member
0 Kudos

Hi Gurprit

I'm not sure if it is possible to close the iframe or is the following line of code pointing out your window webdynpro object or the iframe ui element?

wdComponentAPI.getComponentInfo().findInWindows("Iframe");

Regards

Göran

Edited by: Göran Westin on Feb 20, 2008 2:11 PM