Entering content frame

Object documentation Use of Portal Navigation Locate the document in its SAP Library structure

SAP Enterprise Portal supports navigation between any portal content. For example, it permits navigation from one Web Dynpro application to another, or to any portal content (for example BSP application or ITS application).

Note

Note that page navigation is only performed correctly if all the parts involved, that is the server on which the portal is installed and all other servers used, are in the same domain.

Method navigateAbsolute

The following source text shows you the signature for triggering page navigation:

WDPortalNavigation.navigateAbsolute(java.lang.String navigationTarget,

   WDPortalNavigationMode mode,

   java.lang.String windowFeatures,

   java.lang.String windowName,

   WDPortalNavigationHistoryMode historyMode,

   java.lang.String targetTitle,

   java.lang.String contextUrl,

   java.lang.String parameter);

 

or

WDPortalNavigation.navigateAbsolute(

         "<absoluter PCD-Pfad der Seite oder iView>",

         WDPortalNavigationMode.SHOW_INPLACE,

         "MyWindowFeatures",

         "MyWindowName",

         WDPortalNavigationHistoryMode.Allow_Duplications,

         "MyTargetTitle",

         "MyContextURL",

         "parameter1=value&parameter2=value2");

 

 

The following parameters may be or must be defined:

·        java.lang.String navigationTarget (required parameter)
To trigger navigation to a certain page or iView, you need the absolute Portal Content Directory path (PCD path) of the page or iView. You can find this path in the Portal Catalog, for example by editing a page or iView.

·        WDPortalNavigationMode mode (required parameter)
You must define the required navigation mode. There are three possible modes:

¡        WDPortalNavigationMode.SHOW_INPLACE
This value starts the application in the same browser window.

¡        WDPortalNavigationMode.SHOW_EXTERNAL
This value starts the application in a new external browser window (iView/page).

¡        WDPortalNavigationMode.SHOW_EXTERNAL_PORTAL
This value starts the application in a new external portal window.

·        java.lang.String windowFeatures (optional parameter)
You can also parameters for the window, such as the size and font. You can optionally define the following parameters, like in the HTML object
window. The individual parameters are separated by commas, and blanks are not allowed in the string.

¡        toolbar[=yes,no,1,0]
Displays the usual browser toolbar.

¡        location[=yes,no,1,0]
Defines if the Web address should be displayed.

¡        directories[=yes,no,1,0]
Defines if the directory pushbuttons of the browser should be displayed.

¡        status[=yes,no,1,0]
Defines if the status line of the browser should be displayed.

¡        menubar[=yes,no,1,0]
Defines if a menu bar should be displayed.

¡        scrollbars[=yes,no,1,0]
Defines if scroll bars should be displayed.

¡        resizable[=yes,no,1,0]
Defines if the size can be changed.

¡        width=pixels
Defines the width of the window.

¡        height=pixels
Defines the height of the window.
The values yes, no, 1, 0 are optional. If no value is specified, it corresponds to a value of „yes“ or 1.

·        java.lang.String windowName (optional parameter)
Defines the name of the external browser window. The given Web address is loaded into a window with this name, for example MyWindowName, and can be accessed with this name.

·        WDPortalNavigationHistoryMode mode (required parameter)
This parameter defines if the Web addresses visited should be listed in the navigation history.

¡        WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS
This parameter defines that the visited Web addresses should be listed in the navigation history. More than one entry with the same Web address is possible.

¡        WDPortalNavigationHistoryMode.NO_DUPLICATIONS
This parameter defines that the visited Web addresses should be listed in the navigation history. Web addresses that are visited repeatedly are listed only once.

¡        WDPortalNavigationHistoryMode.NO_HISTORY
This parameter defines that the visited Web addresses should not be listed in the navigation history.

·        java.lang.String targetTitle
This parameter allows you to define a title for the entry in the navigation history.

·        java.lang.String contextURL
This parameter allows you to define the navigation context used.

·        java.lang.String parameter
A number of parameters can also be passed when you navigate to a Web Dynpro application or any other Web application. The following source text shows how  to access the URL parameters:
String Name = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("lastName");

Note

If you define these parameters as application parameters of the Web Dynpro application and specify the parameter names with app.<parametername> (see example), they are automatically passed to the startup plugs of the Web Dynpro application if they were defined as startup parameters. Note that the iView or page that serves as the navigation target must be part of the user role. Otherwise navigation is not triggered.

Method navigateToObject

The following source text shows how the signature is used to trigger object-based navigation.

WDPortalNavigation.navigateToObject(java.lang.String system, java.lang.String businessobjType, java.lang.String objValue, java.lang.String parameter);

 

 

or

WDPortalNavigation.navigateToObject(

         "MyTargetSystem",

         "MyTargetObject",

         "AObjectValue",

         "parameter1=value&parameter2=value2");

 

 

The following parameters may be or must be defined:

·        java.lang.String system (required parameter)
This parameter defines the logical system.
For information about object-based navigation and about creating logical systems, see the SAP Library under
SAP NetWeaver 
®  People Integration  ®  SAP Enterprise Portal Documentation  ®  Administration Guide  ®  Portal Platform  ®  Content Administration  ®  Navigation  ®  Object Based Navigation.

·        java.lang.String businessobjType (required parameter)
This parameter represents the used object that is published by the defined system.

·        java.lang.String objValue (optional parameter)
This parameter typically represents the ID that describes the required object instance. The parameter is passed to the target application as URL parameter draggedValue.

·        java.lang.String parameter (optional parameter)
A number of parameters can also be passed when navigating to a Web Dynpro application or any other Web application. These parameters are used as described in the
navigateAbsolute method.

Example

 

WDPortalNavigation.navigateAbsolute(

         "ROLES://portal_content/com.sap.DemoPortalNavigation/com.sap.TargetPage",

         WDPortalNavigationMode.SHOW_INPLACE,

         "width=300,height=200,location",

         (String) null,

         WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS

         (String) null,

         (String) null,

         "app.firstName=" + wdContext.currentContextElement().getFirstName() + "&app.lastName=" + wdContext.currentContextElement().getLastName());

               

  

  

 

Leaving content frame