cancel
Showing results for 
Search instead for 
Did you mean: 

Parent window is getting distroyed

Former Member
0 Kudos

Hi All,

When I am opening a pop up window through a link. The pop up window is opening but the parant window is getting distroyed.

Please help me.

Arun

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arjun,

Also please check the below link which clearly explains step by step how to create a pop up window if you have added some extra line of code.

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/20d2def3-f0ec-2a10-6b80-877a71ec...

Regards

Narendra

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Are you using LinkToAction UI Element which will display a hyperlink and on clicking the hyperlink the corresponding controller action.

In that case add the following lines of code in the controller action method.

IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("PopWin");

IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);

window.setWindowPosition (300, 150);

window.show();

wdContext.currentPopupNodeElement().setPopupAttribute(window);

where PopWin is the name of the popUp Window

Make sure that there are two windows.

This approach will be followed even if you are using a button in the parent window to open the child window.

Regards,

Gayathri.

Former Member
0 Kudos

Hi Gayathri,

I am using the same code as you mentioned above.

Problem is that i was using NWDS 2.0 then this code was working fine and now i have moved my code to NDWs 7.0. after that popup window is opened but parent window data destroyed, showing blank page and popup window dispalyed on that blank parent window and when i closed(destroy) the popup window then again parent window data displayed currectly.

Please note. Popup window dispalyed by different DC which is mapped through interface controller.

thanks in advance for any help.

arun

former_member201361
Active Contributor
0 Kudos

Hi Arun,

Have u created two windows in the main component?

and please explain ur query in detail.

Thanks and Regards

Former Member
0 Kudos

Hi,

There is one DC A and comp A which is main(parent window) and when clicked on a link then popup window is in different DC B comp B. Data from DC A to DC B is transferred through Component interface mapping by event handler.

Pop up window is in DC B.

1) My query is that when i open the popup by clicking a link then pupup window opened but parent window displayed gray. and when i closed the popup window then again parent window is dispalyed with data(table).

I want that parent window should not display blank when i open a popup window.

2) As above all code was working fine on NDWS 2.0 but after switch the Version 7.0 these problem occures. So is there any issue of versioning and do i need to something else.

Thanks,

Arun

Former Member
0 Kudos

HI,

Can you post the code you are using. Or what you can do is try to figure out if unknowingly u have used code for destroying parent window while creating a pop up window.

Regards

Narendra