on 06-20-2009 12:13 PM
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.
hi
check this SAP Doc for creating confirmation window
http://sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/903fed0d-7be4-2a10-cd96-9136707374e1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.