Cognos TM1 Web JavaScript library

You can use the Cognos® TM1® Web JavaScript library to programmatically access TM1 Web Websheet and CubeViewer objects in a combined HTML, JavaScript, and Dojo web page development environment. A working knowledge of JavaScript, Dojo Toolkit, and the HTML Document Object Model (DOM) is required for using the JavaScript library.

Overview

The Cognos TM1 Web JavaScript library includes the following main classes:

Workbook class
Represents a TM1 Web Websheet.
CubeViewer class
Represents a TM1 Web CubeViewer.

These main classes extend the Dojo Toolkit widget class called dijit._WidgetBase. This extension allows the Workbook and CubeViewer objects to be assigned as children of other Dojo objects such as a Dojo tab container or other container.

For more information about Dojo, see the Dojo documentation: http://dojotoolkit.org/documentation/.

The Websheet and CubeViewer objects also have a set of related properties and methods that you can access programmatically. These objects are loaded asynchronously and must finish loading before your code can interact with the objects.

Configuration

The following configuration is required to use the Cognos TM1 Web JavaScript library.

  1. Install Cognos TM1 Web and verify that you can log in to the standard user interface with a web browser.
  2. Add the required references to the head section of your custom web page files that use the JavaScript library.

    For details, see Required HTML <head> and <body> tags to use the JavaScript library.

Getting started with JavaScript library

After you configured your Cognos TM1 Web environment, you can start coding your web pages to access objects with the JavaScript library. For more information and examples, see the following topics: