cancel
Showing results for 
Search instead for 
Did you mean: 

Issue closing window

Former Member
0 Kudos

hi friends,

I have created a WD Java application for a UWL work item. The application opens in a popup window. I want to close the window once the action is performed in the window. From the other related threads I learn that the usual approach is to have a HTML with a javascript code to close the window and assign this as a source to an iFrame. This doesnt work for me. Could be because it runs in a portal environment. I dont know. Is it possible to open a child window from here and get the instance of the parent window?

Prompt replies would be rewarded. Thanks in advance.

Nathan.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

I dont want to close the child window. Just wanted to know if there is any way to close the main window by calling a child window.

Thanks

Nathan.

Former Member
0 Kudos

Hi Nathan ,

Look into this thread ,

This may help you

Regards

Akshaya

Former Member
0 Kudos

Hi Nathan,

Create a context attribute of type IWDWindow in component controller.

When you want to open the window

IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI

.getComponentInfo().findInWindows("DetailsWindow");

IWDWindow window =wdComponentAPI.getWindowManager()

.createModalWindow(windowInfo);

wdThis.wdGetUrController().wdGetContext().currentContextElement()

.setWindowInstance(window);

To close the window after action is performed ,call the below code

IWDWindow window = wdThis.wdUrController().wdGetContext().currentContextElement().getWindowInstance();

window.destroyInstance();

I hope this solves your problem.

Regards

Akshaya