Skip to Content
0
Apr 16, 2007 at 07:41 AM

fpm.navigate - using the FPM to redirect application to a new URL

146 Views

Hello All,

Has anyone managed to successfully used the fpm navigate method to cause the application to close and open a URL when the application is not running in a portal?

I tried to do the following in the onInit of my Fc, but got an error in that the FPMComponentWindowInterfaceView controller was not instantiated...

	NavigationTarget restartURL =
	new NavigationTarget(					
	null,
	NavigationTarget.NAVIGATION_TYPE_URL,
	null,
	null,
	null,
	true,
	themeURL,
	null,
	null,
	null,
	null,
	WDPortalNavigationMode.SHOW_INPLACE,
	null);
		
	fpm.navigate(restartURL);

error occurs in the FPM code of com.sap.pcuigp.xssfpm.wd.Navigation.java:

if (exitUrl != null && !"".equals(exitUrl)) {
	if ("".equals(windowTarget)) {
		// replace current application with navigation target in same browser window
		wdThis.wdGetFPMComponentWindowInterfaceViewController().wdFirePlugExitPlug(exitUrl);
	} else {
	// open navigation target in new browser window; different targets are not supported by WD
		IWDWindow window =
		wdThis.wdGetAPI().getComponent().getWindowManager().createExternalWindow(exitUrl, text, false);
		window.setWindowPosition(WDWindowPos.CENTER);
		window.open();
	}

the

wdThis.wdGetFPMComponentWindowInterfaceViewController()

fails.

Has anyone else managed to get this method to work? Is there something I should be doing before executing my code? I would have thought that as this interface view controller is the one that all FPM apps use as a starting point, that it would be instantiated...

Help/ideas appreciated.

Thanks,

Chris