cancel
Showing results for 
Search instead for 
Did you mean: 

confirmation dialog box

Former Member
0 Kudos

hi all,

I am displaying confirmation dialog box on which i have two buttons <b>YES</b> <b>NO</b>. but since the YES button is first on the dialog box it is displayed as default. but i want to make NO button as default with changing the order.

Thanks in advance,

Gopi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Try This

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

IWDConfirmationDialog dialog =wdComponentAPI.getWindowManager().createConfirmationWindow("NO",controllerInfo.findInEventHandlers("NO"),"NO");

dialog.addChoice(controllerInfo.findInEventHandlers("YES"),"YES");

dialog.setWindowSize(10, 0);

dialog.open();

Kind Regards

Mukesh

Former Member
0 Kudos

hi mukesh,

Right now i am doing the same way as you said. but can't we make the NO as default with changing the sequence of YES and NO?

Thanks in advance,

Gopi

Former Member
0 Kudos

Hi,

Can you post the code here which is you are using to show confirmation dialog.

regards

karthik

Former Member
0 Kudos

hi karthik,

IWDConfirmationDialog dialog;

String dialogText = "Are you sure want to delete ";

dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText " " Price,

wdControllerAPI.getControllerInfo().findInEventHandlers("onActionNoDel"),"NO");

dialog.addChoice(wdControllerAPI.getControllerInfo().findInEventHandlers("onActionDeletePricegrp"),"YES");

dialog.setWindowPosition(10,10);

dialog.open();

The problem is here that when dialog is displayed it shows NO YES. but i want YES NO but NO should be default.

Thanks,

Gopi

sridhar_k2
Active Contributor
0 Kudos

Hi,

I can able to get, NO as default selection. Try with the below code.

I Created YES , NO Actions.

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

IWDConfirmationDialog dialog =

wdComponentAPI.getWindowManager().createConfirmationWindow(

"Are you Sure To Close?", controllerInfo.findInEventHandlers("onActionNO"),"No");

dialog.addChoice(controllerInfo.findInEventHandlers("onActionYES"),"Yes");

dialog.open();

Regards,

Sridhar

Former Member
0 Kudos

Hi gopi,

Your need is default focus should be on "NO" button. i think it is not possible in NWDS2004. we are using this version. may be it is possible in 2004s.

kind regards

karthik

sridhar_k2
Active Contributor
0 Kudos

Hi Karthik and Gopi,

I have tested in NWDS2004 only. It is working fine. I have used above code only. See my previous response.

Regards,

Sridhar

Former Member
0 Kudos

Hi

You cannot change the default property of dialog box.The Choice which you add first is selected by default.

Kind Regards

Mukesh

Former Member
0 Kudos

Hi sridhar,

what gopi said is the conformation dialog should show YES NO. that is YES added first and then NO is add on choice. but the default focus should be on "NO".

is it possible?

Former Member
0 Kudos

hi sridhar,

its working fine. but the problem is the sequence of the buttons in which it is displayed. if we make the NO as the first button in the dialog it is possible.

Are you able to get the default NO even if the order in the dialog is YES NO?

Gopi

sridhar_k2
Active Contributor
0 Kudos

Hi Gopi,

It is automatically setting focus on the first button, in our case NO. I dont think, you can set focus to the second button.

Regards,

Sridhar

Former Member
0 Kudos

hi all,

Thank you all. i am closing the thread.

Gopi

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi Gopi,

Default depending on the order you adding choice to dialog. swap your YES and NO choice order. then it will change.

Regards, Suresh KB