Skip to Content
author's profile photo Former Member
Former Member

need to create confirmation window as popup


my requirement is to create a popup window, to confirm the user "ok" or "cancel" to take necessary action.

using the below code we were able to create the popup window but after the popup window is displayed and after clicking on the "ok" button we are not able to capture the necessary event.

Currently, the popwindow is displayed upon clicking on the "OK" or "CANCEL" button we are not able to control the user upon the appropriate action

IWDControllerInfo conf= wdControllerAPI.getViewInfo().getViewController();

IWDEventHandlerInfo hndinf= conf.findInEventHandlers("cancelcheck");

IWDConfirmationDialog confd= wdComponentAPI.getWindowManager().createConfirmationWindow(wdComponentAPI.getTextAccessor().getText("cancel_check"),hndinf,wdComponentAPI.getTextAccessor().getText("ok_check"));

hndinf= conf.findInEventHandlers("okcheck");


Please suggest the way forward.

THanks & Regards

Vijay Krishna S

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2011 at 06:58 AM

    Hi vijay,

    Try the below code

    IWDControllerInfo controllerinfo=wdControllerAPI.getViewInfo().getViewController();
                     String dialogbox="Some message to display in confirmation doalog box";
    		IWDConfirmationDialog dialog=wdComponentAPI.getWindowManager().createConfirmationWindow(dialogbox,controllerinfo.findInEventHandlers("ok"),"OK");

    Hope it helps and revert back to me if you face any issue



    Edited by: rahul.girmaji on Dec 8, 2011 8:04 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 08, 2011 at 05:35 AM

    Hi Vijay,

    Try using eventhandlerid instead of eventhandlerinfo. Below is the snippet to do that.

    String dialogText = wdComponentAPI.getTextAccessor().getText("cancel_check");
    IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText, wdThis.WD_EVENTHANDLER_CANCEL_CHECK, wdComponentAPI.getTextAccessor().getText("ok_check"));
    dialog.addChoice(wdThis.WD_EVENTHANDLER_OK_CHECK, wdComponentAPI.getTextAccessor().getText("confirm"));;

    Asuming cancelCheck and okCheck are the eventhandlers. Also make sure, appropriate evenhandler is used for each button, as i see that text for first button is "ok_check" and eventhandler for second button is named okcheck.


    Vishweshwara P.K.M.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member


      Thanks for the reply......

      Iam not able to use eventhandlerid instead of eventhandlerinfo as it is available in the API (Organize Imports).

      cancelCheck and okCheck are the eventhandlers used, in the code i have sent it is properly used,

      please suggest if it mistakenly written

      FYI : I am using NWDS 7.0 SP19



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.