cancel
Showing results for 
Search instead for 
Did you mean: 

Closing the browser - new problem

Former Member
0 Kudos

Hi Experts,

I had this issue of closing the browser in web Dynpro Java. i did it with the help of the experts views posted in SDN(passing the URL of the java file containing the javascript to close the browser to the exit plug). When i created an iView for the application and try to preview it, throws an error reading - com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead to navigate to another application!. Please help.

Thank You.

Kind Regards,

Manoj Durairaj

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Manoj,

Include an html (closeWd.html) page in your WD project under: src/mimes/Components/<Component Name>. The html file must contain the the java script code to close the window.

Create an exit plug type Url on your WD project (FirePlugCloseWindow(Url) for e.j.). To call the plug use the code:

public void onActioncloseWindow (com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
  {
    //@@begin onActionClose(ServerEvent)
	try {
	String Url =WDURLGenerator.getAbsoluteWebResourceURL(
	wdComponentAPI.getComponent().getDeployableObjectPart(),"closeWd.html");
	wdThis.wdGetTestExitInterfaceViewController().wdFirePlugCloseWindow(Url);
	} catch (WDURLException WDURLe) {
		WDURLe.printStackTrace();
	}

    //@@end
  }

Regards,

David Faustini