Scriptable Reports

Page

Interface to a page
Containment

Members

(readonly) hasBack :Boolean

Whether or not the page supports back navigation. This is useful for implementing custom prompt controls.
Type:
  • Boolean
Example

Disable a custom back button if back navigation is not possible

btnCustomBackButton.disabled = !oPage.hasBack;

(readonly) name :String

The page name.
Type:
  • String

(readonly) pageModuleInstance :Promise

The page module instance (the instance created from the module). Since modules are loaded asynchronously, the instance may not be immediately available, so a Promise is returned.
Type:
Example

Obtain a reference to a page module instance using the done method.

oPage.pageModuleInstance.done(
	function( oModuleInstance )
	{
		// The module instance is available here
	} );

Methods

getAllPromptControls() → {Array.<PromptControl>}

Get all prompt controls.
Returns:
All prompt controls on the page. If no prompt controls are found, an empty array is returned.
Type
Array.<PromptControl>
Example
var aControls = oPage.getAllPromptControls();

getControlByName(sName) → (nullable) {Control}

Get a control by name.
Parameters:
Name Type Description
sName String The name of the control.
Returns:
The first control found with that name on the page. If no control is found, null is returned.
Type
Control
Example
var oControl = oPage.getControlByName( "SelectValue1" );

getControlsByName(sName) → {Array.<Control>}

Get all controls with a name.
Parameters:
Name Type Description
sName String The name of the control.
Returns:
All controls on the page with the name. If no controls are found, an empty array is returned.
Type
Array.<Control>
Example
var aControls = oPage.getControlsByName( "SelectValue1" );