Namespace: WebiApplication

WebiApplication

Represents the Web Intelligence Application global namespace object.

Namespaces

bar
dialogbox
eventBus
sidepane

Members

(static) ApplicationTypes

An enum for the types of user interface of the Web Intelligence application
Properties:
Name Type Description
DHTML String Web Intelligence interface (web interface)
DESKTOP String Web Intelligence Rich Client
APPLET String Web Intelligence Java Applet (deprecated)

(static) Events

An enum for the types of event that can happen in the Web Intelligence user interfaces
Properties:
Name Type Description
UNDO_REDO String data parameter has no value.
REPORT_PAGE_LOADED String data parameter has no value.
DATA_REFRESHED String data parameter has no value.
REPORT_SELECTED String data parameter value is the report identifier.
REPORT_ELEMENT_SELECTED String data parameter has no value.

You can get the list of selected report elements from the WebiApplication.getContext attribute.

PERSPECTIVE_SELECTED String data parameter has no value.

You can get the selected perspective from the WebiApplication.getContext attribute.

SAVE_DOCUMENT_AS String data parameter has no value.
SAVE_DOCUMENT String data parameter has no value.

(static) Perspectives

An enum for the types of application modes of the Web Intelligence user interfaces
Properties:
Name Type Description
READING String reading mode
DESIGN String design mode
STRUCTURE String report structure mode
DATA String data mode Not used in SAP Web Intelligence 4.3 SP2
See:
  • The SAP BusinessObjects Web Intelligence User Guide for a description of the application modes

(static) TargetFrames

An enum for the types of target frame of an action in the Web Intelligence user interfaces
Properties:
Name Type Description
SAME_FRAME String the target is the original frame
DIALOG_BOX String the target is a dialog box

Methods

(static) addEventListener(obj)

Adds an event listener.

The callback function is called when the event manager caches an event. It receives the eventType and data parameters. The data value depends on the eventType value. data is optional.

Parameters:
Name Type Description
obj Object
Properties
Name Type Attributes Description
eventType String the type of event
callback function <optional>
function
See:
Example
WebiApplication.addEventListener(
  {
    eventType: WebiApplication.bar.Events.INIT,
    callback: function()
    {
      var df = WebiServices.document.getDrillerFilter(obj);
    }
  })

(static) callExtApi(name, args) → {*}

Function used to communicate with Webi client instance
Parameters:
Name Type Description
name string API call name
args arguments API call arguments
Returns:
The call result if sync call or null
Type
*

(static) displayErrorMessage(obj)

Displays an error message.
Parameters:
Name Type Description
obj Object the error message
Properties
Name Type Attributes Description
message String the message text
code String <optional>
the error code
title String <optional>
the text to display as dialog box title
Example
WebiApplication.displayErrorMessage({
 'message': 'Testing displayErrorMessage function',
 'code': '0000',
 'title': 'Custom Button'
 })

(static) getContext() → {object|WebiApplication.ApplicationTypes|String|String|Integer|String|String|String|Integer|Integer|Array.<String>|String|String|String|WebiApplication.Perspectives}

Returns the Web Intelligence application context.
Returns:
  • A JSON object representing the application context with the following properties:
    Type
    object
  • object.applicationType
    Type
    WebiApplication.ApplicationTypes
  • object.documentName the Web Intelligence document name
    Type
    String
  • object.currentUser the account name of the current user
    Type
    String
  • object.documentId the document identifier
    Type
    Integer
  • object.documentCuid the document CUID
    Type
    String
  • object.currentUserId the user identifier
    Type
    String
  • object.currentUserCuid the user CUID
    Type
    String
  • object.selectedReportId the selected report
    Type
    Integer
  • object.pageNumber the selected page number
    Type
    Integer
  • object.selectedReportElementsInfo an array containing the selected report element identifier and reference identifier
    Type
    Array.<String>
  • object.pvl the Preferred Viewing Locale
    Type
    String
  • object.lang the language used in the document
    Type
    String
  • object.readingDirection a string with value ltr: left to right or rtl: right to left
    Type
    String
  • object.selectedPerspective
    Type
    WebiApplication.Perspectives
Example
var response = WebiApplication.getContext();
this.setSelectedReportId(response.selectedReportId);

(static) isReady() → {Boolean}

Returns whether if the Web Intelligence Application is ready to use.
Returns:
true if they are ready, false otherwise
Type
Boolean

(static) loadReport(obj)

Loads a report into the Web Intelligence application interface.

Both parameters are optional. If the object is not specified, then the current report will be reloaded.

The default report is the one currently displayed. The default page is the one currently displayed.

Parameters:
Name Type Description
obj Object
Properties
Name Type Attributes Default Description
reportId Integer <optional>
the current report a valid report identifier
pageNumber Integer <optional>
the current page the number of the selected page of the report
Example
var docContext = WebiApplication.getContext();
WebiApplication.loadReport({'reportId': docContext.selectedReportId});

(static) navigateTo(obj)

Navigates to a page within a target frame.
Parameters:
Name Type Description
obj Object
Properties
Name Type Description
url String the relative URL of the page
targetFrame WebiApplication.TargetFrames the target frame
Example
<script type='text/javascript'>
  function click() {
    WebiApplication.navigateTo({url:'myDialog.jsp', targetFrame:WebiApplication.TargetFrames.DIALOG_BOX});
    }
</script>
<input type='button' name='ButtonTest' value='Test dialog box' onclick='click()' />

(static) removeEventListener(obj)

Removes the event listener.
Parameters:
Name Type Description
obj Object
Properties
Name Type Attributes Description
eventType WebiApplication.Events the type of event
callback function <optional>
function
See:

(static) setWaitCursorDisplayed(displayopt)

Displays or hides the wait cursor.
Parameters:
Name Type Attributes Default Description
display Boolean <optional>
true true to display the wait cursor, false otherwise
Example
<script type='text/javascript'>
  function displayWaitCursor(delay) {
    WebiApplication.setWaitCursorDisplayed(true);
    setTimeout('hideWaitCursor()', delay * 1000);
  }

  function hideWaitCursor() {
    WebiApplication.setWaitCursorDisplayed(false);
  }
</script>