cancel
Showing results for 
Search instead for 
Did you mean: 

Error in Confirmation Dailog box

Former Member
0 Kudos

Hi All,

In my application I am using a confirmation dilog box.The problem is that sometimes I am not able to see the event handler button in the dailog box.(The dialog box is visible but the button is missing ).This is happening if there is an exception occuring in the sequence method of methods I call.Can anyone of you tell me how do i handle this.

Thankx,

Praveen.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Anagha,

Thank you for the quick reply.The below is the code I have followed to open the dialog box.This code I have written in my Custom Controller :

IWDConfirmationDialog dailog = wdComponentAPI.getWindowManager().createConfirmationWindow(dailogText,wdThis.wdGetAPI().getControllerInfo().findInEventHandlers("OK"),"Ok");

dailog.setTitle("Error Message");

dailog.open();

As per your reply do u want me to declare this IWDConfirmationDailog before opening it.But I am doing the same thing.Kindly let me know if I am wrong

Thankx,

Praveen

Former Member
0 Kudos

Have you declared it only at one place (in the beginning) but you have written code for opening the dialog box at multiple places? ...Try putting declaration at all places just before you are opening...

i.e, repeat all three lines mentioned above every place instead of only the "setTitle" and "dialog.open" at multiple places. This was what I did and it had solved the problem for me.

Former Member
0 Kudos

Hi,

It is allways better to create a seperate method as below and call this method when ever you get any error by passing the error message.


public void displayErrorMessage(String errorMessage)
{
IWDControllerInfo cinfo = wdControllerAPI.getViewInfo().getViewController();
IWDConfirmationDialog confirmDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(errorMessage, cinfo.findInEventHandlers("OK"), "  OK  ");
confirmDialog.setWindowSize(350,90);
confirmDialog.setTitle("Error Message");
confirmDialog.setWindowPosition(WDWindowPos.LEFT);
confirmDialog.setWindowPosition(100,230);
confirmDialog.show();
}

Regards,

Charan

Former Member
0 Kudos

The method specifies a general title to the message window. If the requirement is to use different titles each time for different message boxes this wouldn't help...

Former Member
0 Kudos

Hi,

If you want to show different titles then add another paramter "title" for the same method and pass that arguement dynamically when ever you call this method.

For example if you want to display some success message:

displayMessage("Successfully saved in database","Success Message");

For example if you want to display validation error message:

displayMessage("Please enter username","Validation Message");

For example if you want to display error message:

displayMessage("Error while storing the data in database","Error Message");


public void displayMessage(String message, String title)
{
IWDControllerInfo cinfo = wdControllerAPI.getViewInfo().getViewController();
IWDConfirmationDialog confirmDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(message, cinfo.findInEventHandlers("OK"), "  OK  ");
confirmDialog.setWindowSize(350,90);
confirmDialog.setTitle(title);
confirmDialog.setWindowPosition(WDWindowPos.LEFT);
confirmDialog.setWindowPosition(100,230);
confirmDialog.show();
}

Regards,

Charan

Former Member
0 Kudos

I had once faced a similar problem. Check this thread: