cancel
Showing results for 
Search instead for 
Did you mean: 

Stoping code by opening a popup

Former Member
0 Kudos

Hi,

is it possible to stop the running code when I open a popup window.

//

IWDWindow window = wdComponentAPI.getWindowManager()

.createWindow( windowInfo, true);

window.open();

//

The code should wait until the popup is closed.

Thanks in advance,

Thomas

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks for your help Nibu!

Former Member
0 Kudos

Hi Nibu,

I did all the things you wrote.

But I am starting the method (showPopup()) which opens the popup from another java class. When the window in this method opens the code is still running and finishs the showPopup() method and goes back to the java class.

In this class I need information from the Popup (username,password) to start the next method.

When the code arrives this point I haven`t seen any popup to fill username or password and that results in a exception.

Former Member
0 Kudos

Hi Thomas,

As I told you, you <b>cannot</b> stop a WebDynpro method in between it's execution.

Kindly go through the sample application. That application does exactly what you are asking. If you need some data from your parent view inside your pop-up view, use data mapping to map the corresponding value through your component controller.

In the sample application, a method in the parent view, brings up a pop-up window, from which the user can select certain values and then on click of a button, the selected values are submitted to the parent view and the pop-up is destroyed.

Hey, by the way, in this sample tutorial both the views are in the same application. If your second view is in another webdynpro application, then you need to use Inter-application navigation. For this this document may help you :

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tu... on inter-application-navigation - 15.htm

Hope this helps,

Best Regards,

Nibu.

Former Member
0 Kudos

Hi Shubham,

I am opening the popup window and fill the component controller context from inside there.

The problem is that the method which opens the popup continues with the code (during open popup) and asks for information in the context of the component controller. And that leads to an exception, because the context isn`t filled till then.

There is also no popup shown, because the exception occurs before. (despite of opening the window first)

Former Member
0 Kudos

Hi Thomas,

By no means you can <b>stop the code</b> in webdynpro.

But you can achieve your functionality by making using of Events in webdynpro. Define an event in your component controller, and a handler for that in your parent view. Do the necessary context mapping from both the parent view and the pop-up view to your component controller. Now, from the popup window, you can trigger this event and the parent view's action will be executed.

You can find a very similar application in this tutorial

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/di... boxes in web dynpro applications.pdf

Hope this helps,

Best Regards,

Nibu.

Former Member
0 Kudos

Hi Thomas,

Its not clear what you want to acheive. Please explain in detail.

Regards,

Shubham