Navigation APILocate this document in the navigation structure

The Navigation API provides methods for navigating in the portal. For more information, see Navigating in the Portal .

This section describes the following navigation types:

  • Absolute navigation

  • Relative navigation

  • Object-based navigation

Absolute Navigation

For absolute navigation you have to provide the full path name of the component. The full path name starts at the navigation hierarchy root node and continues all the way to the navigation target.

EPCM.doNavigate(String target, [int mode, String winFeat, String winName, int history, String targetTitle, String context])

Triggers absolute navigation on the client. If the mode parameter is not specified, the WorkProtect feature checks the Dirty indicator of the component and opens the target in a new window or on the current portal page depending on the result of the check.

The optional parameters can be used when the target is displayed in a new window.

The method always returns false .

Parameter

Type

Description

target

String

Navigation target that corresponds to the location in PCD or another structure (see details below)

mode

(optional)

int

0: The target is displayed in the same window

1: The target is displayed in an external new standalone window

2: The target is displayed in an external new portal window

3: The target is displayed in an external portal window in a headerless framework page

4: The target is displayed in an external portal window in a headerless framework page that has an embedded inner page

10: The target is displayed in an external portal window in a headerless framework page that supports Microsoft Internet Explorer standards mode rendering (support for HTML5 applications).

winFeat

(optional)

String

Properties of a new window in which the target opens. This is a comma-separated list of features with no blanks that has the same syntax as the JavaScript window.open method.

For example: width=400,height=500

winName

(optional)

String

Window title for the new window in which the target opens

history

(optional)

int

History tracking mode:

0: Track history entries, allow duplicates

1: Track history entries, do not allow duplicates

2: Do not track history entries

targetTitle

String

Optional. Can be used to specify the navigation target title that appears in the browser, page toolbar, and navigation history. If not specified, the iView/page name is used as a title.

Context

String

Navigation context URL

Sample Code
<SCRIPT language ="JavaScript">
   // navigate
   EPCM.doNavigate(
         "ROLES://portal_content/folder1/role1/workset1/iView111")
</SCRIPT>
     
<A HREF="myLink" 
  onclick="return EPCM.doNavigate
        ('ROLES://portal_content/folder1/role1/workset1/iView111')"> 
This is an HTML Link
</A> 

               

Result

This starts the navigation to the iView 111 under role 1.

Figure 1: Figure 1: Navigation Hierarchy Example

Relative Navigation

For relative navigation, specify the location of the navigation target relative to the current navigation node.

EPCM.doRelativeNavigate(String basenodename, int level, List pnamesList, int mode, String winFeat, String winName, int history, String targetTitle, String context])

Triggers relative navigation on the client. You have to provide the location of the navigation target relative to the current node. To enable the navigation model to create an absolute path, you have to provide at least the level or the pnameslist parameters in addition to the basenodename parameter.

The optional parameters can be used when the target is displayed in a new window.

The method always returns false .

Parameter

Type

Description

basenodeName

String

Current node

level

int

Number of hierarchy levels to step up

pnameslist

List

A list with all the atomic names of the children nodes, relative to the node that has been reached by moving up the number of levels defined by the level parameter.

mode

int

0 or not specified: Depending on the setting of the WorkProtect feature, the target opens in a new window or on the current desktop.

1: Open target in a new window, with no a portal header and navigation bar.

2: Open target in a new window, with a portal header and navigation bar.

winFeat

(optional)

String

Properties of a new window in which the target opens. This is a comma-separated list of features with no blanks that has the same syntax as the JavaScript window.open method.

Example: width=400,height=500

winName

(optional)

String

Window title for the new window in which the target opens

history

(optional)

int

History mode

0: Track history entries and allow duplicates.

1: Track history entries and do not allow duplicates.

2: Do not track history entries.

targetTitle

String

Title for the page title bar. In case the navigation target is sent through an integrator, the title is that of the integrator. You can specify a title for this navigation target and optionally for the history entry.

Context

String

Navigation context URL

Sample Code
<SCRIPT language ="JavaScript">
   // navigate.
   EPCM.doRelativeNavigate(
         "ROLES:// portal_content/role3/Folder32/Folder33", 2, 
          {"page3"}, ..., ..., ...); 
</SCRIPT>
     
<A HREF="myLink" 
  onclick="return EPCM.doRelativeNavigate
        ('ROLES:// portal_content/role3/Folder32/Folder33', 2, 
          {"page3"}, ..., ..., ...)"> 
This is an HTML Link
</A> 

               

Result

Navigation starts from folder 33 under role 3 to page 3 under role 3 (see figure 1).

Note

If you do not provide the basenodename parameter that indicates the current node, the navigation model finds the current navigation node on its own and add it to the path automatically.

Object-Based Navigation

The object-based navigation (OBN) feature enables navigation based on business objects from productive back end systems. For background information, see Object-Based Navigation .

EPCM.doObjBasedNavigate(String systemAlias, String businessObjName, String objValue, String operation)

Allows navigating in a context environment, without a specific URL for a navigation target.

The method always returns false .

Parameter

Type

Description

systemAlias

String

The system alias of a business object

businessObjName

String

The name of the business object for which the operation was defined

objValue

String

Used to pass the business object related data to a navigation target. Can be any string added to the URL of the navigation target after the ? separator, which the target iView can access via its Request object.

operation

String

Specifies the operation to perform when the business object has more than one operation