cancel
Showing results for 
Search instead for 
Did you mean: 

Action to open a popup windows?

Former Member
0 Kudos

Hi experts,

In a view I want to have a button which has an action 'search' to open a popup window. So how to write this action code?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Following is the code



//To Show the window
IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("<Your Window Name>");
	  IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
	  window.show();


	  // Store this window for later use to close it
	  //Create a context attribute of type IWDWindow
	  wdContext.currentContextElement().setWindowHandle(window);
	  
	  //To close it
	  IWDWindow window = wdContext.currentContextElement().getWindowHandle()
	  window.destroyInstance();

Regards

Ayyapparaj

Answers (3)

Answers (3)

amolgupta
Active Contributor
0 Kudos

hi,

pop up is a new window.

so make a new view for the pop-up.

make a window for this pop-up view.

you will be calling this window as a pop-up.

make a context element for your window of IWDWindow type.

write the following code in the action of the event when you want the popup...

// IWDWindowInfo objWindowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("<Window name here>");

// IWDWindow objWindow = wdComponentAPI.getWindowManager().createModalWindow(objWindowInfo);

//

// objWindow.setWindowPosition(300,150);

// objWindow.setTitle("Choose Manufacturer");

// objWindow.setWindowSize(300,400);

// objWindow.show();

// wdContext.currentPopupNodeElement().setCtxManuPopup(objWindow);

regards,

-Amol

Former Member
0 Kudos

hi,

refer the following link which gives u step by step creation of pop up window.

Creating a Simple Java Web Dynpro Pop-up Window

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/20d2def3-f0ec-2a10-6b80-877a71ec...

it will help u.

Former Member
0 Kudos

Hi,

refer this pdf it explains everything you need.

refer this Creating and Implementing the showAddressbookPopup() method in this pdf.

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/903fed0d-7be4-2a10-cd96-91367073...

Regards,

ramesh