cancel
Showing results for 
Search instead for 
Did you mean: 

How to close the pop up window ?????

Former Member
0 Kudos

Hi All,

I have a requirement wherein a webdynpro application opens as a pop up window by clicking a wokitem in a UWL.I have to provide a close button in the pop up window and on click of the button,pop up window should close and control is taken back to the workitem in UWL..Please elaborate your answer in steps by steps...

I will appreciate a gud response.Reward points will be awarded.

Thanxs.

Amit

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

The following code is to open a pop-up :

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

IWDWindow window = wdComponentAPI.getWindowManager().createWindow( windowInfo, true);

window.setWindowPosition(295,100);

window.setWindowSize(120,120);

window.open();

wdContext.currentContextElement().setPop(window);

where 'Popup' is the window name under which the popup view will be embedded.

Implement this code in button action to close the popup:

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

window.destroy();

where ' pop' is a context attribute with its data type as IWDWindow

Regards,

Dinesh

Former Member
0 Kudos

Hi

Sorry what i had given before is not working

see this

Regards

Abhijith YS

Former Member
0 Kudos

Hi Amit

Try this <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">Tutorial</a>

Regards

Chaitanya.A

Former Member
0 Kudos

Hi

Find the thread below

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/forums">how to close pop up window</a>

former_member185029
Active Contributor
0 Kudos

Hi,

Create a context in parent screen of type IWDWindow and assign the window object you have created for openining popup to it. Share this context with the popup window through controller

Then onActionClose simple access the context and call close method.

Ashu