cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically change URL iView link

Former Member
0 Kudos

Hi,

I have a requirement like this:

Button1 would open an external link from Portqal

Button2 would open a KM document from KM

Button3 would open a KM folder

In future the link type of these button can change.

These external link, KM document location and KM folder location are read from a properties file and are subject to change.

Here is my Approach

I have created a separate URL iViews for testing purpose and tested that with URL iView, it is possible to open:

External link in the format of http://www.<link>.com

KM Folder in the format /irj/go/km/navigation/documents/..../<Destination Folder> , &

KM document in the format /irj/go/km/docs/documents/..../<Destination File>

I have now created a single URL iView pointing to a default URL(google), and marked the URL iView parameter Forced URL - Enabled as True

The plan is to use this single iView for invoking any type of links - be it external, KM Folder or KM document

In WebDynpro, I have tried using the following code to call this iView:

		
WDPortalNavigation.navigateAbsolute(("ROLES://portal_content/demo_role/universal_url_iview",
WDPortalNavigationMode.SHOW_EXTERNAL,
WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
"forcedURL="+dynamicURL);

Not Working! Always opening the default google link.

		
WDPortalNavigation.navigateAbsolute(("ROLES://portal_content/demo_role/universal_url_iview",
WDPortalNavigationMode.SHOW_EXTERNAL,
WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
"app.forcedURL="+dynamicURL);

Not Working! Always opening the default google link.

where dynamicURL= either http://www.<link>.com or /irj/go/km/navigation/documents/..../<Destination Folder> or /irj/go/km/docs/documents/..../<Destination File>

Am I missing any configuration or the code is wrong?

Accepted Solutions (1)

Accepted Solutions (1)

former_member192152
Active Participant
0 Kudos

You really need to open the url within an iView? Oo


IWDWindow window=wdComponentAPI.getWindowManager(). 
.createExternalWindow("http://www.google.co.in","Google-search for an email address",false);
window.setWindowSize(100,100);
window.open();

or


String linkToBeOpen = "https://www.sdn.sap.com/irj/sdn";
IWDWindow window =
wdComponentAPI.getWindowManager().createNonModalExternalWindow(
linkToBeOpen,
"My window title");
window.show();

or


import com.sap.tc.webdynpro.clientserver.portal.WDPortalUtils;
import com.sap.tc.webdynpro.clientserver.navigation.api.WDPortalNavigation;
 
...
 
if ( ! WDPortalUtils.isRunningInPortal()  ) { // standalone mode
  wdThis
    .wdGetExternalcompInterfaceViewController()
      .wdFirePlugGoToUrl(urlobject);
} else { // portal iView mode
  WDPortalNavigation.navigateAbsolute(
    ... /*set of parameters that I do not understand 😉 */
  );
}

regards,

Angelo

Answers (0)