cancel
Showing results for 
Search instead for 
Did you mean: 

Confirmation Dialog

MVar
Explorer
0 Kudos

Hello,

I am trying to create a confirmation dialogue in my Web Dynpro project. Below is the code. When this logic is invoked, a box is displayed but neither the message and the button is displayed.

Any thoughts.

Thanks,

Mike

IWDConfirmationDialog dialog;

String dialogText = "No Employee Record Found";

dialog = wdComponentAPI.getWindowManager().

createConfirmationWindow(

dialogText,

wdControllerAPI.getControllerInfo().findInEventHandlers("Ok"),

"OK");

dialog.open();

Accepted Solutions (0)

Answers (2)

Answers (2)

brahmanandam_ausali
Participant
0 Kudos

hi mike.

create event handler with name <b>onActionButton_0</b>

and write the below code on some action say button.

the eventhandler name in confirmationdialogwindow should match exactly. i hope problem with ur cody is with event handler name.

IWDConfirmationDialog cdialog = wdComponentAPI.getWindowManager().createConfirmationWindow("This is the Confirmation text",wdControllerAPI.getControllerInfo().findInEventHandlers("onActionButton_0"),"OKKKKKKK");

cdialog.open();

i just tried this.

and it is working.

if ur problem is solved let me know.

thanks .

Brahmanandam Ausali

Former Member
0 Kudos

Hi,

Got to properties of the view

In required controllers add the component controller

Create the necessary eventhandlers by clicking method tab in view.Suppose if there are two options in the confirmation box- Ok and Cancel , create 2 event handlers by name "Ok" and "Cancel"

String dialog = "Confirm Reservation";

IWDConfirmationDialog confirm =

wdThis.wdGet<Controller name>Controller().wdGetAPI().getWindowManager().createConfirmationWindow(dialog,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Ok"),"Ok");

confirm.addChoice(wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Cancel"),"Cancel");

confirm.open();

Hope this helps you

Regards

Rohit

MVar
Explorer
0 Kudos

Thanks to all who responded. The box is now displaying properly.

arun_srinivasan
Contributor
0 Kudos

hi mike,

try this

IWDControllerInfo con=wdControllerAPI.getViewInfo().getViewController();

String dia="No Employee Record Found";

IWDConfirmationDialog dialog=wdComponentAPI.getWindowManager().createConfirmationWindow(dia,con.findInEventHandlers("ok"),"ok");

dialog.open();

u refer the following links

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tu... on creating dialog boxes - 10.htm

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/di... boxes in web dynpro applications.pdf

hope this helps,

Regards,

Arun