Skip to Content
avatar image
Former Member

How to setonclose for a ModalWindow/confirmationDialog

Hi,

I'm looking for help here about How can I popup a confirmation dialog or modal window with a close icon on top right?

I've tried codes as following:

IWDConfirmationDialog dialog = wdThis.wdGetAPI().getComponent().getWindowManager().createConfirmationWindow(dialogText, actOk, delete);

dialog.setOnClose(actCancel);

dialog.addChoice(actCancel, cancel);

dialog.setWindowPosition(WDWindowPos.CENTER);

dialog.setWindowSize(400, 100);

dialog.setIcon("~IconLarge/WarningMessage");

dialog.setTitle(textAccessor.getText(IMessageTextComp.CONFIRM_DELETION_TITLE));

dialog.show();

I was able to see the close icon, but when clicked, dump occurs.

I'm developing on ce 7.11

version details:

SAP NetWeaver Developer Studio

SAP Enhancement Package 1 for SAP NetWeaver Developer Studio 7.1 SP01 PAT0000

Build id: 200811082206

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Jun 17, 2009 at 07:43 PM

    Hello Josie!

    Your code is right, but, have a little change for works fine how you want:

    dialog.setOnClose(wdThis.WD_EVENTHANDLER_ON_ACTION_ACT_CLOSE, true);

    Only with it, your application works fine!

    Regards,

    Ronaldo Rampelotti

    Add comment
    10|10000 characters needed characters exceeded