cancel
Showing results for 
Search instead for 
Did you mean: 

Show a Popup

Former Member
0 Kudos

Hi,

I have two DCs, each one with a view. Importing DC1 component in DC2 I can navigate from View of DC1 to a view of DC2.

I would know if it's possible to show the View of DC2 as a popup.

Best Regards.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sorry, I can open popup...!!

But I can't move it...and it isn't an Internet explorer popup..

regards.

Former Member
0 Kudos

Raffaele,

<i>But I can't move it...</i>

This is known limitation of current WD HTML client

<i>...and it isn't an Internet explorer popup</i>

It's impossible to create real browser pop-up using WD API. The only options you have is a) inner non-movable pop-in you currently get; b) separate explorer window that runs new WD application (disconnected from original one)

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

<i> This is known limitation of current WD HTML client</i>

Does anyone know if SAP has any plans to change that? It's incredibly user-unfriendly not to be able to move around a popup.

Thanks

David.

Answers (5)

Answers (5)

Former Member
0 Kudos

How can I come back to first View passing any parameters?

Former Member
0 Kudos

Hi,

1. First create value attribute of type com.sap.tc.webdynpro.

services.session.api.IWDWindow under a value node in the context of the controller.

2. When you open the window using window.open() add this line after that

wdContext.currentPopupElement().setWindowInstance(window);

3. In the pop up view when you can initiate a action and this line of code to close the pop up

IWDWindow window =

wdContext.currentPopupElement().getWindowInstance();

window.destroy();

For the complete procedure and step by step instruction go through the pages 17 -20 of below link provided by Maksim.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">PopUp</a>

Former Member
0 Kudos

Ah ok!!!

Best Regards!!!

Former Member
0 Kudos

I did as you said. But when I call the interface_method I can't navigate to popup and I have the following Exception:

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Parameter windowInfo must not be null.

Former Member
0 Kudos

Hi,

Lets say you have following two DC's

DC1 --> comp1 --> window1 --> view1

&

DC2 --> comp2 --> window2 --> view2

Now you want to call window2 as a popup window in view1....right?

Follow the steps:

1) Create a method in comp2's component controller to call window2 as a popup window like below

public method2()

{

IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI

.getComponentInfo().findInWindows("window2");

IWDWindow window = wdComponentAPI.getWindowManager().createWindow( windowInfo, true);

window.setWindowPosition(<left>, <top>);

window.setWindowSize(<width>, <height>);

window.open();

}

2) Now expose this method in the interface controller of DC2

a) I mean create a method say, method_interface in interface controller

b) call method2 of component controller in the method of interface controller

3) call this method method_interface in the view1 of DC1 like

wdThis.wdcomp1InterfaceUsage().method_interface();

your motive is solved....

Tell me if you face any problem in implementing above.

Regards

Deepak Gupta

former_member182372
Active Contributor
0 Kudos
former_member186016
Active Contributor
0 Kudos

Perfect !