on 02-26-2009 4:47 AM
Hi,
I got this code to get error message in pop up window. But this code is giving null pointer exception.
Can any one tell what is the exception. and how to solve it.
IWDConfirmationDialog dialog;
String dialogText = "Duplicate value ";
dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(
dialogText,
wdControllerAPI.getControllerInfo().findInEventHandlers("ok"),
"ok"
);
dialog.open();
Regards,
H.V.Swathi
HI,
wdControllerAPI.getControllerInfo().findInEventHandlers("ok"),
1. check the Event Handler is in component controller itself (not in view since your code is pointing to component controller)
2. name of Event Handler is case-sensitive.
nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Most probably you are getting the null pointer exception because of wdControllerAPI.getControllerInfo().findInEventHandlers("ok") as WD is not able to find the ok event handler.
I guess you have already defined the "ok" event handler in your view .
Considering that the name of the event handler is "ok" , you can make the following change in
your code
confirmDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,wdThis.WD_EVENTHANDLER_ON_ACTION_OK, "ok");
Regards,
Ashish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swathi,
Try to use this code, working fine
IWDControllerInfo controllerInfo = wdControllerAPI.getViewInfo().getViewController();
String dialogText = "You really want to delete....";
IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("Yes"),"Yes");
dialog.addChoice(controllerInfo.findInEventHandlers("No"),"No");
dialog.setTitle("Delete Confirmation");
dialog.show();
Regards,
Lakshmi Prasad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swathi
Use this code which you mentioned is deprecated So it might be the cause of the error ,other thing is event handler Id.
IWDWindowManager dialog = null;
String dialogText = "Duplicate value ";
dialog.createConfirmationWindow("confirmation message", wdThis.wdGetTestAction(),dialogText);
Let see
Best regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.