cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a Window

Former Member
0 Kudos

Hi,

I am working on creating a pop up window in WebDynpro application. This window is not an external Window, just a pop up that displays a WebDynpro View. I have discovered that the createWindow() method is deprecated. Can someone shed some light on how to create a pop up?

Deprecated Code:

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

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

window.setWindowPosition(WDWindowPos.CENTER);

window.setWindowSize(50, 150);

window.open();

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Brian,

Eventhough it is deprecated, you can use it to create a popup.

Regards,

Jhansi

Former Member
0 Kudos

Thanks for the reply Jhansi. I am using it but was concerned that since the createWindow() was deprecated that perhaps it was not the best way to create a pop up window. It is working for now.

Regards,

Brian

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Brian,

Instead of using

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

use the

IWDWindow window = wdComponentAPI.getWindowManager().<b>createModalWindow</b>(windowInfo);

which is not deprecated.

Regards,

Jhansi

Former Member
0 Kudos

Thanks Everyone! Problem is solved.

Regards,

Brian

Former Member
0 Kudos

Almost forgot the solution. Thanks again to all!

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

WDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);

window.setWindowPosition(WDWindowPos.CENTER);

window.setWindowSize(50, 150);

window.show();

Former Member
0 Kudos

Hi,

IWdwindow excelLinkWindow ;

excelLinkWindow =wdComponentAPI.getWindowManager().createModalWindow(wdComponentAPI.getComponentInfo().findInWindows("ExcelLinkPopup"));

excelLinkWindow.setWindowPosition(WDWindowPos.CENTER);

excelLinkWindow.open();

Crete the new Window in ur application .

This might helps you.

Thanks,

Lohi.

Former Member
0 Kudos

hi,

in you code

<b>wdComponentAPI.getWindowManager().createWindow(windowInfo, true);</b> is deprecated. use

wdComponentAPI.getWindowManager().createModalWindow(windowInfo, true)

and instead of

window.open();

use

window.show();

Deprecated methods may not be supported in future versions.

Regards,

Gopi

ingo_hauchwitz
Explorer
0 Kudos

Hi Brian,

the following section in the docu should help you

http://help.sap.com/saphelp_nw04/helpdata/en/75/064640c0e56913e10000000a1550b0/content.htm

In the following step, the java-code to show and destroy the window is described...

regards

ingo