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

Conformation dialog doubt

Hi,

In my Webdynpro java Application,

I have to call one conformation dialog to continue the process.

Form one view I am calling one method in controller.That method is calling other methods in controller.

In one senario, one of that method need user event (ok/cancel).

So my question is how can i call this in my Controller method ?

I know this method of creating dialog in view.

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

String dialogText = "The email was successfully sent!";

IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("ok"),"ok");

dialog.addChoice( controllerInfo.findInEventHandlers("newEmail"), "new email");

dialog.open();

But how can I implement this in controller or how can I call this if I implement in view?

Thanks and Regards

Priya

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 12, 2012 at 04:20 AM

    Hi Priya,

    You can open a confirmation window even from a method in compenent controller. To extract the event handlers you can use wdThis instead of using wdControllerAPI.

    EX:
    IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow("The email was successfully sent!", wdThis.WD_EVENTHANDLER_CONFIRM_ACTION, "Yes");

    dialog.addChoice(wdThis.WD_EVENTHANDLER_CANCEL_ACTION, "No");

    dialog.show();

    Assuming confirmAction and cancelAction are two eventHandler methods created in controller.

    Regards,

    Vishweshwara P.K.M.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Priya,

      I guess you are using NWDS 7.0x, so you are not able to provide IWDEventHandlerId. You can use the below line of code to extract the controllerInfo and then use this to extract the eventHandlerInfo as you did in view controller.

      IWDControllerInfo controllerInfo = wdControllerAPI.getComponentInfo().findInControllers("<Component Name>");

      Regards,

      Vishweshwara P.K.M.

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.