cancel
Showing results for 
Search instead for 
Did you mean: 

Confirmation Dialog box with Yes/No?

Former Member
0 Kudos

Hello all

I have one requirement regarding confirmation dialog box with yes/no buttons and If yes execute bapi mode otherwise cancel navigation, how to do it.

Regards

CSP

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Dear Predeep

Try the following link

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/creatingConfirmationDialogBoxinWebDynproJava

I hope it will help u

Regards

Naresh Garg

Former Member
0 Kudos

Hi,

IWDControllerInfo controllerInfo =

wdControllerAPI.getViewInfo().getViewController();

String dialogText = "Confirm Deletion";

IWDConfirmationDialog dialog =

wdComponentAPI.getWindowManager().createConfirmationWindow(

dialogText,

controllerInfo.findInEventHandlers("Yes"),

"Yes");

dialog.addChoice(

controllerInfo.findInEventHandlers("No"), "No");

dialog.open();

and create two eventhandlers Yes and No.

and implement the bapi call code in Yes event handler.

Regards,

ramesh

Edited by: Ramesh Babu V on Sep 5, 2008 5:11 PM

Former Member
0 Kudos

Hi,

Code for Confirmation window is :-

you need to get controller info for that, code is

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

IWDConfirmationDialog dialog =wdComponentAPI.getWindowManager(). createConfirmationWindow("<dialogText>",controllerInfo.findInEventHandlers(<"name of the Handler function credated by you for Ok"),"Ok");

name of the Handler function means i have created window with Ok abd cancel button.

*for "Ok" you need to create event handler and "Ok" is the name of button*

dialog.setTitle( "Delete Confirmation");

this line use to add "Cancel button with it's Event handlerdialog.addChoice(controllerInfo.findInEventHandlers("name of the Handler function credated by you for cancel"),("Cancel"))

dialog.open();

And in the Event Handler function for "Ok" button you need to write code for execute bapi.

And same for the Cancel logic in the "Cancel event handler".

Hope this may help you.

Deepak

Former Member
0 Kudos

Hi,

Please refers the followings links.

Dialog Boxes in Web Dynpro Applications

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/903fed0d-7be4-2a10-cd96-91367073...

Confirmation Dialog Box

Thanks

Abhilasha

PradeepBondla
Active Contributor
0 Kudos

Hi,

this will answer your question

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/903fed0d-7be4-2a10-cd96-91367073...

check page 22 in above document

PradeeP