Entering content frame

InfoSource documentation Client API Locate the document in its SAP Library structure

The methods in this chapter are provided by the JavaScript object pageSupport that exists on every Portal page. Although the pageSupport object resides on the page document, iViews using the URL or PUMPED isolation mode must refer to their parent document to get the pageSupport object.

pageSupport.getIvuId ( wndRef )

This method returns the iView ID of the iView specified by parameter wndRef as type String.

Note

An alternative to this method, is to use PRT API on the server.

request.getComponentContext ().GetContextName ()

Use the client-side method if your iView uses URL or PUMPED isolation mode and if you have no access to the PRT API.

Parameter Description

Argument

Type

Description

wndRef

Object

The HTML window object of the iView.

Usage

<SCRIPT language ="JavaScript">

   var myId = parent.pageSupport.getIvuId(self);

<SCRIPT>

 

pageSupport.getIvuFrameObj (ivuId)

This method returns the iView IFrame object of the iView specified by the iView ID as type Object.

This method is only relevant for iViews using URL or PUMPED isolation mode.

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   var myIframe = parent.pageSupport.getIvuFrameObj(myId);

   myIframe.style.width += 100;

   ...

<SCRIPT>

 

pageSupport.getIvuWindow (ivuId)

This method returns the iView window of the iView specified by the iView ID as type Object.

This method is only relevant for iViews using URL or PUMPED isolation mode.

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   var myWindow = parent.pageSupport.getIvuFrameWindow(myId);

   myWindow.location.href = "url";

   ...

<SCRIPT>

 

pageSupport.ivuExpand (ivuId)

This method opens an iView, specified by the iView ID, in a new window. The method returns a boolean value that is false if the method failed and true if the method was successful.

This method simulates the Open in new window option of the iView tray.

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   parent.pageSupport.ivuExpand(myId);

   ...

<SCRIPT>

 

pageSupport.ivuRefresh (ivuId)

This method refreshes an iView specified by the iView ID. The method returns a boolean value that is false if the method failed and true if the method was successful.

If the iView content is in the Portal cache it will be replaced by new content generated for this iView.

This method simulates the Refresh option of the iView tray.

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   parent.pageSupport.ivuRefresh(myId);

   ...

<SCRIPT>

 

pageSupport.ivuReload (ivuId)

This method reloads an iView specified by the iView ID. The method returns a boolean value that is false if the method failed and true if the method was successful.

The iView content is retrieved from the Portal cache. See method pageSupport.ivuRefresh(ivuID).

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   parent.pageSupport.ivuReload(myId);

   ...

<SCRIPT>

 

pageSupport.ivuPersonalize (ivuId)

This method opens the personalization dialog for the iView specified by the iView ID. The method returns a boolean value that is false if the method failed and true if the method was successful.

This method simulates the Personalize option of the iView tray.

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   parent.pageSupport.ivuPersonalize(myId);

   ...

<SCRIPT>

 

pageSupport.ivuHelp (ivuId)

This method opens the help component for the iView specified by the iView ID. The method returns a boolean value that is false if the method failed and true if the method was successful.

This method simulates the Help option of the iView tray.

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   parent.pageSupport.ivuHelp(myId);

   ...

<SCRIPT>

 

pageSupport.ivuRemove (ivuId)

This method removes the iView, specified by the iView ID, from the page. The method returns a boolean value that is false if the method failed and true if the method was successful.

When the iView was added to the page by the user with the personalization dialog, the iView will be deleted from the page.

When the iView was set on the page by the administrator, the iView will be hidden and not deleted. The iView can be made visible again with the personalization dialog by the user.

This method simulates the Remove from page option of the iView tray.

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   parent.pageSupport.ivuRemove(myId);

   ...

<SCRIPT>

 

pageSupport.ivuAdjustHeight (ivuId [,height])

This method adjusts the height of the IFrame that contains the iView, specified by the iView ID. The method returns a boolean value that is false if the method failed and true if the method was successful.

This method is only relevant for iViews using URL or PUMPED isolation mode.

Use this method when the iView changes its size and you want the IFrame to change its size also. If you do not specify the height parameter, the IFrame height will be adjusted to the current size of the iView. This is same behaviour as for iViews that have the automatic height property.

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

Height

(optional)

Integer

Height of the IFrame.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   parent.pageSupport.adjustHeight(myId, 500);

   ...

<SCRIPT>

 

pageSupport.ivuRecalcTray (ivuId)

This method is for Netscape browsers to adjust the tray size (which contains the iView) according to iView content. The method returns a boolean value that is false if the method failed and true if the method was successful.

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   parent.pageSupport.ivuRecalcTray (myId);

   ...

<SCRIPT>

 

pageSupport.ivuAddTrayOption (ivuId, optionTitle, optionFunct)

This method add a new entry to the tray (which contains the iView) options menu. The method returns a boolean value that is false if the method failed and true if the method was successful.

For multilingual application, the iView developer has to take care about the translation of the optionTitle parameter.

Parameter Description

Argument

Type

Description

ivuId

String

iView ID of the iView.

optionTitle

String

Title of the option. The title is displayed in the option menu of the tray.

optionFunc

String

JavaScript code that will be executed when the option is chosen.

Usage

<SCRIPT language ="JavaScript">

   ...

   var myId = parent.pageSupport.getIvuId(self);

   parent.pageSupport.ivuAddTrayOption(myId,"hello","alert('hello')");

   ...

<SCRIPT>

 

Leaving content frame