Show TOC

Advanced FeaturesLocate this document in the navigation structure

Use

Hide Portal Application

At runtime, a portal application can notify the page builder that it should not be included in the response. This feature can be utilized for many scenarios when a certain portal application, located on a page, should not be displayed according to its logic. The Detailed Navigation iView uses this technique to hide itself when no relevant navigation tree can be displayed.

To use this feature, the portal application must execute the following code in the doOnNodeReady() method:

request.getNode.setNodeMode(new NodeMode("HideMode"))

Note

This feature is only available for portal applications using the embedded isolation method.

More information: Isolation Methods

Redirect Portal Application

A portal application using the URL isolation method can instruct the page builder to reference a URL from the generated IFrame named src, instead of including the portal application itself. Therefore, a portal application can be used to generate a URL and launch it from the page.

There are following requirements to use this feature:

  • Include the following property to the <component config> section in the portalapp.xml file of the portal application:

    <property name="com.sap.portal.reserved.iview.Redirect" value= "true"/>

  • Portal application must use the URL isolation method.

  • Use the following code in the doOnNodeReady(..) method:

    request.redirect(NewURL);

New Connection for Portal Application

A portal application using the URL isolation method can use another connection than the portal Runtime (PRT) default connection ( com.sapportals.portal.prt.connection ). This avoids the PRT embedded handling of certain document hooks and HTML tags, such as <head> or <body> .

To create a new connection, you have to implement the IPortalURLBuilder interface and register it in the portal registry under /runtime/urlbuilders/<NEW CONNECTION POINT> .

The property file of the portal application ( portalapp.xml ) needs a property entry in the <component config> section so that the page builder is notified to use the new implemented connection. The property entry has the following format:

<property name="RequiredConnectionPoint" value="<NEW CONNECTION>" />

JavaScript on Page Level

A portal application can notify the page to add JavaScript files on the page builder document level. This feature is relevant for isolated portal applications only.

To use this feature, the portal application has add the following properties to the property file ( portalapp.xml ) in the <component-profile> section:

<property name="com.sap.portal.reserved.iview.PageLevelScript_1" value=<"SCRIPT 1 ID"> >

<property name="Path" value=<"SCRIPT 1 PATH"> />

</property>

<property name="com.sap.portal.reserved.iview.PageLevelScript_n" value=<"SCRIPT N ID"> >

<property name="Path" value=<"SCRIPT NPATH"> />

</property>

Page Timeout

A page timeout property can be defined to set maximum (server) loading time for the page.

Usually the page will be sent to the browser as soon as all of the portal applications have been loaded. If a page with the timeout set to 15 seconds contains a portal application that requires more than 15 seconds to load, a timeout message is displayed instead of the application. The following scenarios are possible:

  • If the portal application is can be cached, and this is the first time the page is loaded, the page builder continues to load the application in the background; if the page is refreshed after the application finished loading, the portal application content will be displayed in place from the cache.

  • If the page was already loaded once and the portal application was already cached, the application will come from the cache. This is a fast process and there is no problem with the page timeout. But if the cached content of the portal application is not valid, the application has to be reloaded from the site. If the portal application did not finish loading when the page timeout occurred, the page will display the old cached content of the application with a message indicating that it is the old cached content. The portal application is still loaded in the background so in the next time the page is reloaded it will display the correct cache content.

An administrator or a page developer must avoid the case where a slow portal application, with the embedded isolation method, resides on a page with a page timeout lower than the actual portal application loading time. The result would be that the application is not loaded into the cache in the background and the application will never be displayed on the page.

A portal application that uses the URL isolation method will load the portal application directly from browser, without considering the page timeout property, when the Refresh option has been chosen.

To define the page timeout, add the following property to the property file ( portalapp.xml ):

com.sap.portal.page.PageTimeout=20000

The value is defined in milliseconds. The default value is 15 seconds = 15000 milliseconds. A page timeout value of -1 means that there is no timeout and that the page will wait for all of the portal applications to finish loading as long as necessary.

Parameters List

Portal applications using URL isolation method are loaded by the browser from an IFrame. The portal applications are completely isolated from the page structure and from the page load process and therefore are also isolated from the initial page request. If the initial page request contained parameters, these parameters will not be passed to the portal application using the URL isolation method. To change this behavior, you have to add the property com.sap.portal.reserved.iview.ParamList to the property file of the portal application ( portalapp.xml ). The property contains a list of parameters for the portal application. There are following options:

  • The list contains the parameters for the portal application URL:

    <property name=" ...ParamList" value="param1,param2,param3"/>

  • To pass on all of the parameters from the request to the portal application you can use a wildcard (*):

    <property name=" ...ParamList" value="*"/>

  • To pass on a subset of the parameters from the request to the portal application, you can use a wildcard (*) and define the parameters you want to exclude:

    Example:

    <property name=" ...ParamList" value="*,param4,param5"/>

    This will pass all of the request parameters excluding parameter 4 and 5.