cancel
Showing results for 
Search instead for 
Did you mean: 

Create a popupwindow

Former Member
0 Kudos

Hi,

how can i greate a popupwindow with a committed url?

Regards

Chris

Accepted Solutions (0)

Answers (5)

Answers (5)

arun_srinivasan
Contributor
0 Kudos

Hi

For Popup

1) Create a value attribute of type com.sap.tc.webdynpro.services.session.api.IWDWindow in the main window.

2) Create a value attribute of the same type above in the popup view.

3) Do a context mapping for the attributes.

4) Type the code given below in the event handler from where you want the window to popup.

Code for opening a popup

IWDWindowInfo wininfo = wdComponentAPI.getComponentInfo() .findInWindows(<Popup window name>);

IWDWindow win = wdComponentAPI.getWindowManager().createWindow(wininfo,true);

win.open();

wdContext.currentContextElement().set<value attribute name>(win);

Code for destroying the popup

Type the code given below in the event handler in the popup window from where you want to close the window.

IWDWindow win = wdContext.currentContextElement().get<value attribute name>;

win.destroy();

For opening a external url

IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(

"http://www.google.com","value",false);

window.open();

Hope this helps,

Regards,

Arun

0 Kudos

Hi,

Use the below given code to get a dialog window:

String dialogText = "Content of the dailog box";

IWDConfirmationDialog dialog = wdComponentAPI.getWondowManager().

createConfirmationWindow( dialogText,

wdThis.wdGetAPI().getViewInfo().

getViewController().findInEventHandlers("d_hand"),

"OK" );

Here you need to define an eventHandler named d_hand (or whatever name you like) in which you will define functionality what you want at the click of OK button. You can add extra buttons on the dialog box using:

dialog.addChoice( wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("new_hand"), "new_button_label");

dialog.open();

You can add several options like adding title or image and many others at your choice.

Award points if useful.

Regards,

Aditya

Former Member
0 Kudos
0 Kudos

Hi,

Use the below given code to get a dialog window:

String dialogText = "Content of the dailog box";

IWDConfirmationDialog dialog = wdComponentAPI.getWondowManager().

createConfirmationWindow( dialogText,

wdThis.wdGetAPI().getViewInfo().

getViewController().findInEventHandlers("d_hand"),

"OK" );

Here you need to define an eventHandler named d_hand (or whatever name you like) in which you will define functionality what you want at the click of OK button. You can add extra buttons on the dialog box using:

dialog.addChoice( wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("new_hand"), "new_button_label");

dialog.open();

You can add several options like adding title or image and many others at your choice.

Award points if useful.

Regards,

Aditya

former_member186016
Active Contributor
0 Kudos