on 11-05-2007 11:49 AM
Hi Forum
I needed a confirmation dialog i have created two event handlers ie delUserConfirmation_ok and delUserConfirmation_cancel in the controller of my project. Then on the Click event of my delete button in the view I want the confirmation dialog box to appear. So for this I have written the following code:
IWDControllerInfo controllerInfo =wdControllerAPI.getViewInfo().getViewController();
String dialogText = "Do you want to delete the user";
IWDConfirmationDialog dialog =wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("delUserConfirmation_ok"),"ok");
dialog.addChoice(controllerInfo.findInEventHandlers("delUserConfirmation_cancel"), "cancel");
dialog.open();
but on clickin the delete button I am getting null pointr error.Also is it possible to hv a click event ie action for the ok button of my dialog box.
Thanks&Regards
Jaspreet Kaur
Hi Jaspreet,
Just open up the view and select the Method tab and see that you have event handler named delUserConfirmation_ok and delUserConfirmation_cancel and if you don't have then you need to create.
IWDConfirmationDialog dialog =wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("<b>delUserConfirmation_ok</b>"),"ok");
dialog.addChoice(controllerInfo.findInEventHandlers("<b>delUserConfirmation_cancel</b>"), "cancel");
Also, confirm that the name is exactly the same that you provided while creating event handlers.(Keep case sensitivity in mind).
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
It is because you have not defined the event handlers delUserConfirmation_ok and delUserConfirmation_cancel in your contoller.
thanks & regards,
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
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.