Show TOC

Client APILocate this document in the navigation structure

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

pageSupport.getIvuId ( wndRef )

Returns the iView ID of the iView specified by the wndRef parameter.

Note

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

Alternatively, you can use the server-side PRT API:

request.getComponentContext ().GetContextName ()

Parameter

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)

Returns the iView IFrame object of the iView specified by the iView ID.

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

Parameter

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)

Returns the window object of the iView specified by the iView ID

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

Parameter

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)

Opens an iView, specified by the iView ID, in a new window. Returns a boolean value indicating success or failure.

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

Parameter

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)

Refreshes an iView specified by the iView ID. Returns a boolean value indicating success or failure.

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

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)

Reloads an iView specified by the iView ID. Returns a boolean value indicating success or failure.

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

Parameter

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)

Opens the personalization dialog for the iView specified by the iView ID. Returns a boolean value indicating success or failure.

This method implements the Personalize option of the iView tray.

Parameter

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)

Opens the help component for the iView specified by the iView ID. Returns a boolean value indicating success or failure.

This method implements the Help option of the iView tray.

Parameter

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)

Removes the iView, specified by the iView ID, from the page. Returns a boolean value indicating success or failure.

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 implements the Remove from page option of the iView tray.

Parameter

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])

Adjusts the height of the IFrame that contains the iView, specified by the iView ID. Returns a boolean value indicating success or failure.

This method is only relevant for iViews using the URL 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 behavior is the same as for the iViews that have the automatic height property.

Parameter

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)

Enables Web browsers other than Internet Explorer to adjust the tray size according to iView content. Returns a boolean value indicating success or failure.

Parameter

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)

Adds a new entry to the iView's tray options menu. Returns a boolean value indicating success or failure.

For a multilingual application, you have to ensure that the optionTitle parameter is translatable.

Parameter

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>