cancel
Showing results for 
Search instead for 
Did you mean: 

close window from DynPro application

Former Member
0 Kudos

Hi,

I have a pop-up window (separate iview).

This window contains a "Back" button. The functionality of that "Back" button is:

1. Fill a database with values from the window.

2. Close the window.

My problem is that I don't have a clue how to close the browser window from Java.

When I use System.exit(0); IE gives an error-screen.

I tried setting event.setAction("window.close()");

Than the question arises how I can raise that event....

Can anyone give a clue?

TIA,

Mylene

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mylene,

I guess you have solved this one by now, but I just came across the same problem and solved it by creating an exit plug in the webdynpro application. In the action handler for the back button you fire the exit plug with Url "javascript:self.parent.close();". Creation of exit plug is nicely described in one of the tutorials for webdynpro here on sdn.

Best regards,

Andreas

Former Member
0 Kudos

As I understand it, this is yet not covered by the WebDynpro API. But I can think of a workaround:

Put a second iView onto the popup window (->put your iView and the second onto a page and popup the page address, not the your iview address). Second iView content will be this -

<script>

EPCM.subscribeEvent("namespace","close","myhandler");

function myhandler(eventData){

window.close();

}

</script>

size of that iView will be fixed to 0,0.

You closing code in WebDynpro then calls

WDPortalEventing.fire("namespace","close","");

This could work. However I've coded this from the top of my head, so do not take it literally. The feature with the javascript EPCM object is called the 'Enterprise Portal Client Framework', if further reading is required.

Regards,

Armin