cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Confirmation Dialogbox

Former Member
0 Kudos
66

Hello All,

Below is my code for displaying the confirmation dialogbox. However, I am currently having problem to have this popup box appear. Can someone point out where I may have gone wrong ? Thank you very much.

PS : I have already created an event handler named "handleOk".

<u><b>My Code</b></u>

// Popup dialog to display error and prompt user to try again.

wdComponentAPI.getMessageManager().reportSuccess("Dialog box has opened.");

String displayText= messagegetUserInfoFromId + " . Please try again or contact the IT Helpdesk for further assistance.";

IWDConfirmationDialog dialog = wdThis.wdGetCreationCompController().wdGetAPI().getWindowManager().

createConfirmationWindow( displayText,

wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("handleOk"),

"Ok");

dialog.open();

wdComponentAPI.getMessageManager().reportSuccess("Dialog box has closed.");

from

Kwok Wei

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kwok Wei ,

I don't see any problem in your code.

1 .If your code is try-catch bolck first check "messagegetUserInfoFromId" is null or not.

2. Verify the EventHandlerName also once agian.

Regards, Anilkumar

Former Member
0 Kudos

Hello Anilkumar,

1) The messagegetUserInfoFromId is definitley not null as i can print it out using "wdComponentAPI.getMessageManager().reportSuccess(messagegetUserInfoFromId);".

2) I have also verified that the event handler name is also correct.

The code simply executes but for some reason, just simply does not popup the box. This is really very puzzling...

from

Kwok Wei

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Kwok,

I am extremely sorry for giving you wrong information. Anilkumar is right. Popup blocks doesn't have any effect on the confirmation window,

Best Regards,

Nibu.

Former Member
0 Kudos

Hi,

I feel popup block will not cause any problems for ConfirmationDialog !!!

Regards, Anilkumar

Former Member
0 Kudos

Hello All,

The problem has been solved . Apparently the fault does not lie with the code that i have posted but rather its due to the fact that I have a previous popup instance which is not closed. Hence when I attempt to display the confirmation dialogbox, it did not work. Many thanks t Anilkumar for fiding that out for me.

from

KWok Wei

Former Member
0 Kudos

Hi Kwok,

Please ensure that you have enabled popups in your browser. The code given by you have no errors as such.

Hope this helps,

Best Regards,

Nibu.