Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Action to open a popup windows?

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!

Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question