cancel
Showing results for 
Search instead for 
Did you mean: 

subsequent popupwindows

Former Member
0 Kudos

I am trying this:


IWDConfirmationDialog dialog1 = 
    this.wdComponentAPI.getWindowManager()
              .createConfirmationWindow(
	"Is it working (1)?",
	wdControllerAPI.getControllerInfo()
            .findInEventHandlers("ok"),	"Ok1");
dialog1.setTitle("Dialog 1");
dialog1.setWindowPosition(WDWindowPos.RIGHT);
dialog1.open();

IWDConfirmationDialog dialog2 =
     this.wdComponentAPI.getWindowManager()
               .createConfirmationWindow(
	"Is it working (2)?",
	wdControllerAPI.getControllerInfo()
              .findInEventHandlers("ok2"),"Ok2");
dialog2.setTitle("Dialog 2");
dialog2.setWindowPosition(WDWindowPos.CENTER);
dialog2.open();

When I run this, the two dialogboxes are displayed at the same time, and one of them has no button.

What I want is first display the first one, press ok, and then display the second one.

In fact, I want to have two alerts. I want to use it for debugging purposes, i.e. to display values in a for-loop.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Just open second windows in "ok" event handler.

BDW. this is not propper debuging

Former Member
0 Kudos

In .Net there's a simple MessageBox class. In JScript there's an alert function. And in Dynpro I'm already struggling for hours to display some simple popup messages...:(

And I was not asking about an opinion about my way of debugging, I just want to show the popup messages.

I think I am going to use the MessageManager. A lot simpler...

Former Member
0 Kudos

>>And I was not asking about an opinion about my way of debugging

Like you said MessageManager is simplier way. Or start debug mode.

There is no reason to be angry

Former Member
0 Kudos

Jan,

<i>In .Net there's a simple MessageBox class</i> -- yes, running as part of <b>client-side</b> WinForms.NET application (event if it installed via ClickOnce)

<i>In JScript there's an alert function</i> -- yes, available as part of <b>client-side</b> browser functionality.

<i>And in Dynpro I'm already struggling for hours to display some simple popup messages</i> -- because you do not understand that in reality both <b>client</b> and <b>server</b> part are involved. And 2 HTTP requests are necessary. Via first HTTP request you are opening one dialog. When user click "OK" then second HTTP request should be send and handled at server (and you have to open second dialog in OK action handler).

<i>I think I am going to use the MessageManager</i> -- log files and debugger built-in into NW IDE even better.

VS

Former Member
0 Kudos

Hi Jan,

U need to create two event handlers for the 2 confirmation boxes with the name ok and ok2 as u have mentioned in ur post.

In the implementation of the ok event handler give the second confirmation box.

<i>IWDConfirmationDialog dialog2 =

this.wdComponentAPI.getWindowManager()

.createConfirmationWindow(

"Is it working (2)?",

wdControllerAPI.getControllerInfo()

.findInEventHandlers("ok2"),"Ok2");

dialog2.setTitle("Dialog 2");

dialog2.setWindowPosition(WDWindowPos.CENTER);

dialog2.open();</i>

Hope this helps,

Regards,

Rathna.

former_member182372
Active Contributor
0 Kudos

Hi Jan,

leave

IWDConfirmationDialog dialog1 = 
    this.wdComponentAPI.getWindowManager()
              .createConfirmationWindow(
	"Is it working (1)?",
	wdControllerAPI.getControllerInfo()
            .findInEventHandlers("ok"),	"Ok1");
dialog1.setTitle("Dialog 1");
dialog1.setWindowPosition(WDWindowPos.RIGHT);
dialog1.open();

as is and

IWDConfirmationDialog dialog2 =
     this.wdComponentAPI.getWindowManager()
               .createConfirmationWindow(
	"Is it working (2)?",
	wdControllerAPI.getControllerInfo()
              .findInEventHandlers("ok2"),"Ok2");
dialog2.setTitle("Dialog 2");
dialog2.setWindowPosition(WDWindowPos.CENTER);
dialog2.open();

put to event handler "ok" implementation.

Best regards, Maksim Rashchynski.