cancel
Showing results for 
Search instead for 
Did you mean: 

Window not closing

Former Member
0 Kudos

In one of my views i have a button...when i press that a window opens up with a drop down list.......when i select a value from the drop down n press ok it throws an exception....

com.sap.tc.webdynpro.services.exceptions.WDIllegalArgumentException: Tried to close window ID MPCELLJBfa title Select a Reason, but was not on top of the queue. Top window ID MPCEf7 title Docket Details!

at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.popModalWindow(ApplicationWindow.java:161)

at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.doClose(WebDynproWindow.java:398)

at com.sap.tc.webdynpro.clientserver.window.Window.doClose(Window.java:153)

at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handle(ApplicationWindow.java:270)

at com.sap.tc.webdynpro.clientserver.window.ApplicationWindow.handleWindowEvents(ApplicationWindow.java:237

what cud b the way out...

null

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kanwalpreet,

Use this code for "close button"action

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

window.hide();

and u check this links also,

Regards,

vino

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Kanwalpreet,

You could use the following code in the close button of your window.

IWDWindow window = wdContext.currentPopUpElement().getWindowInstance();
window.destroy();

Value Node -- PopUp

|____Value Attribute -- WindowInstance of type com.sap.tc.webdynpro.services.session.api.IWDWindow

Hope this helps.

Former Member
0 Kudos

if it's popup window, did u handle code to close the window. I mean you need to store the ref of IWDWindow in the context attribute.

Former Member
0 Kudos

yes m doin that....

Former Member
0 Kudos

Hi Kanwalpreet

For basic idea please refer to the following link

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">Dialog Boxes in WebDynpro</a>

Go Through <b>page 16</b> of the PDF Document

Regards

Chaitanya.A