cancel
Showing results for 
Search instead for 
Did you mean: 

standard "X" for closing popup??

Former Member
0 Kudos

Hi

i've created a popup like written in several threads, but i miss the standard window CLOSE ("X)" for closing this popup? Can i activate that? I want to have it beside the "minimize" "maximize" functionality!?

Thx

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

This functionality is available in version 7.1.

Armin

Former Member
0 Kudos

Hi Armin

I think we've just upgraded to 7.1 (or 7.0).

Is that automatically integrated or do i have to make changes in NWDS (maybe i need to update NWDS too!?)?

Former Member
0 Kudos

There is a completely new API available for handling popup windows (starting with EhP1(?) of 7.1). Until then, just add a button at the bottom of the view contained in the popup and assign an action that closes the window.

Armin

Answers (1)

Answers (1)

former_member197348
Active Contributor
0 Kudos

Hi,

What is the type of your window (Modal or NonModal)?

For NonModal Window, you can use standard "X", "Minimize" and "Maximize" buttons.

If it is Modal Window, I don't think it is possible to have standard Close, Minimize and Maximize buttons. But you can have work around for this.

Create a context attribute (windowInstance) with property

type com.sap.tc.webdynpro.services.session.api.IWDWindow

Store the popup window instance in windowInstance

E.g.

IWDWindowInfo windowInfo = 
(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows("PopupWin");
		//create the  Window
		IWDWindow window = 
wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
		//show the window
		window.show();
//save window instance in context
wdContext.currentContextElement().setWindowInstance(window);

Then wherever you want you can access the instance.

Create Close button in he pop up view and in the implementation of action of close button.

//get the instance 
IWDWindow window = wdContext.currentPopupElement().getWindowInstance();
// close the window
window.destroyInstance();

Regards,

Siva