cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an easy way to implement a confirm dialog?

Former Member
0 Kudos

Hi All,

I'm wondering is there an easy way to show an confirm dialog to user with out create a new view manually?

Thanks,

YiNing

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

yes


String dialogText = "Your message Goes Here";
	  //controllerInfo.findInEventHandlers("Close") Close event handler should be existing , its case sensitive
	  IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(
	  dialogText,controllerInfo.findInEventHandlers("Close"),"Close");
	  dialog.show();

Regards

Ayyapparaj

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

use the below code for confirmation box , with 2 options "OK "

and "Cancel"

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

IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow

( String dialogText,controllerInfo.findInEventHandlers ("ok"),"Ok");

dialog.addChoice(controllerInfo.findInEventHandlers ("cancel"), "Cancel");

dialog.open();

Thanks,

Sunitha Hari

Former Member
0 Kudos

Thank you both:)