Skip to Content
avatar image
Former Member

Issue closing window

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Aug 23, 2007 at 04:22 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 23, 2007 at 04:48 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded