Event APIs

The event system definition for cv.api class (cv.api.event). Contains all necessary calls for creating and registering events.

Constructor

Name
Description

new event()

Methods

Name
Description

disableDragAndDrop(disableDragAndDrop)

Sets flag to indicate drag and drop should be disabled.

disableTableContextMenu(disableTableContextMenu)

Disables or enables the table context menu event.

disableTableDoubleClick(disableTableDoubleClick)

Disables or enables the table double click event.

isEventDisabled(event) : boolean

Returns whether an event should be stopped.

registerActionEventListener(listener) : Event

Registers a listener that runs after report actions and before refresh report.

registerBuildMenuListener(listener) : Event

Registers a listener which runs before showing any of the menus in Analyzer.

registerChartDoubleClickListener(listener) : Event

Registers a listener which runs when double-clicking on a chart item in Analyzer.

registerChartSelectItemsListener(listener) : Event

Registers a listener which runs when a user selects a chart data point or lassos a collection of data points. The listener can also run when the user clears chart items by clicking on the selected chart item or by clicking the Clear Selections button.

registerDragEventListener(listener) : Event

Registers a listener which runs when a user starts dragging an object in the report area, layout panel, or available fields.

registerDropEventListener(listener) : Event

Registers a listener which runs after a drop has occurred in the report area, filter area, trash can, or layout panel.

registerInitListener(listener) : Event

Registers a listener that runs during the initialization of Analyzer.

registerPostExecutionListener(listener) : Event

Registers a listener which is called after the report has completely finished executing in Mondrian and the server has returned with either an HTML or JSON result, depending on the visualization type.

registerPreExecutionListener(listener) : Event

Registers a listener which is called just before the browser sends the report XML to the server for processing.

registerRenderListener(listener) : Event

Registers a listener that runs after the UI has drawn the visualization.

registerTableClickListener(listener) : Event

Registers a listener that runs at clicking on table cell of Analyzer.

registerTableContextMenuListener(listener) : Event

Registers a listener that runs at opened context menu of table cell of Analyzer.

registerTableDoubleClickListener(listener) : Event

Registers a listener which runs when double-clicking on a table cell in Analyzer.

registerTableMouseMoveListener(listener) : Event

Registers a listener which runs when a user moves the mouse cursor across any table cell in Analyzer.

registerTableMouseOverListener(listener) : Event

Registers a listener which runs when a user positions the mouse cursor over any table cell in Analyzer.

Constructor Details

Methods Details

disableDragAndDrop(disableDragAndDrop)

Sets flag to indicate drag and drop should be disabled.

  • Source

javascript/scripts/cv_api_event.js, line 447

  • Parameters

    Name
    Default Value
    Summary

    disableDragAndDrop :

Name

Default Value

Summary

disableDragAndDrop :

disableTableContextMenu(disableTableContextMenu)

Disables or enables the table context menu event.

  • Source

javascript/scripts/cv_api_event.js, line 475

  • Parameters

    Name
    Default Value
    Summary

    `disableTableContextMenu : boolean

    string`

Name

Default Value

Summary

`disableTableContextMenu : boolean

string`

disableTableDoubleClick(disableTableDoubleClick)

Disables or enables the table double click event.

  • Source

javascript/scripts/cv_api_event.js, line 460

  • Parameters

    Name
    Default Value
    Summary

    `disableTableDoubleClick : boolean

    string`

Name

Default Value

Summary

`disableTableDoubleClick : boolean

string`

isEventDisabled(event) : boolean

Returns whether an event should be stopped.

  • Source

javascript/scripts/cv_api_event.js, line 488

  • Parameters

    Name
    Default Value
    Summary

    event : string

    Name of event in question.

  • Returns

    Name
    Description

    boolean

    Flag to indicated if event should be stopped.

Name

Default Value

Summary

event : string

Name of event in question.

Name

Description

boolean

Flag to indicated if event should be stopped.

registerActionEventListener(listener) : Event

Registers a listener that runs after report actions and before refresh report.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 178

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed after report actions and before refresh report.

  • Returns

    Name
    Description

    Event

    Object which allows you to remove the listener post registration.

  • Example

cv.api.event.registerActionEventListener(function(event, api, actionCode, actionCtx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which is executed after report actions and before refresh report.

Name

Description

Event

Object which allows you to remove the listener post registration.

registerBuildMenuListener(listener) : Event

Registers a listener which runs before showing any of the menus in Analyzer.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 346

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which runs before showing any of the menus in Analyzer.

  • Returns

    Name
    Description

    Event

    This is the object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerBuildMenuListener(function(event, api, menuId, menu, x, y) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which runs before showing any of the menus in Analyzer.

Name

Description

Event

This is the object which allows you to remove the listener after registration.

registerChartDoubleClickListener(listener) : Event

Registers a listener which runs when double-clicking on a chart item in Analyzer.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 254

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed when double-clicking a chart item.

  • Returns

    Name
    Description

    Event

    This is the object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerChartDoubleClickListener(function(event, api, ctx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which is executed when double-clicking a chart item.

Name

Description

Event

This is the object which allows you to remove the listener after registration.

registerChartSelectItemsListener(listener) : Event

Registers a listener which runs when a user selects a chart data point or lassos a collection of data points. The listener can also run when the user clears chart items by clicking on the selected chart item or by clicking the Clear Selections button.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 231

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed when a user selects a chart data point or lassos a collection of data points.

  • Returns

    Name
    Description

    Event

    This is the object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerChartSelectItemsListener(function(event, api, ctx[]) { // Perform Action on api.* event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which is executed when a user selects a chart data point or lassos a collection of data points.

Name

Description

Event

This is the object which allows you to remove the listener after registration.

registerDragEventListener(listener) : Event

Registers a listener which runs when a user starts dragging an object in the report area, layout panel, or available fields.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 378

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed after a drag has occurred.

  • Returns

    Name
    Description

    Event

    This is the object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerDragEventListener(function(event, api, formula) { // Perform Action on api.* event.stopImmediatePropagation(); }); ```

Name

Default Value

Summary

listener : function

This is the listener function which is executed after a drag has occurred.

Name

Description

Event

This is the object which allows you to remove the listener after registration.

registerDropEventListener(listener) : Event

Registers a listener which runs after a drop has occurred in the report area, filter area, trash can, or layout panel.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 201

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed after a drop has occurred.

  • Returns

    Name
    Description

    Event

    object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerDropEventListener(function(event, api, formula, dropClass) { // Perform Action on api.* event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which is executed after a drop has occurred.

Name

Description

Event

object which allows you to remove the listener after registration.

registerInitListener(listener) : Event

Registers a listener that runs during the initialization of analyzer.

  • Source

javascript/scripts/cv_api_event.js, line 96

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed during the initialization.

  • Returns

    Name
    Description

    Event

    This is the object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerInitListener(function(event, cv)) { // Perform Action on cv.api.* event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which is executed during the initialization.

Name

Description

Event

This is the object which allows you to remove the listener after registration.

registerPostExecutionListener(listener) : Event

Registers a listener which is called after the report has completely finished executing in Mondrian and the server has returned with either an HTML or JSON result, depending on the visualization type.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 423

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is called after the report has completely finished executing.

  • Returns

    Name
    Description

    Event

    This is the object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerPostExecutionListener(function(event, api, message) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which is called after the report has completely finished executing.

Name

Description

Event

This is the object which allows you to remove the listener after registration.

registerPreExecutionListener(listener) : Event

Registers a listener which is called just before the browser sends the report XML to the server for processing.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 400

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which runs before a report is run.

  • Returns

    Name
    Description

    Event

    This is the object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerPreExecutionListener(function(event, api) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which runs before a report is run.

Name

Description

Event

This is the object which allows you to remove the listener after registration.

registerRenderListener(listener) : Event

Registers a listener that runs after the UI has drawn the visualization.

  • Source

javascript/scripts/cv_api_event.js, line 158

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed after the UI has drawn the visualization.

  • Returns

    Name
    Description

    Event

    Object which allows you to remove the listener post registration.

  • Example

cv.api.event.registerRenderListener(function(event, api, reportArea) { // Perform Action on api.* event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which is executed after the UI has drawn the visualization.

Name

Description

Event

Object which allows you to remove the listener post registration.

registerTableClickListener(listener) : Event

Registers a listener that runs at clicking on table cell of Analyzer.

  • Source

javascript/scripts/cv_api_event.js, line 116

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed at click on table cell.

  • Returns

    Name
    Description

    Event

    Object which allows you to remove the listener post registration.

  • Example

cv.api.event.registerTableClickListener(function(event, api, td, ctx, filterCtx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which is executed at click on table cell.

Name

Description

Event

Object which allows you to remove the listener post registration.

registerTableContextMenuListener(listener) : Event

Registers a listener that runs at opened context menu of table cell of Analyzer.

  • Source

javascript/scripts/cv_api_event.js, line 137

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed at open context menu on table cell.

  • Returns

    Name
    Description

    Event

    Object which allows you to remove the listener post registration.

  • Example

cv.api.event.registerTableContextMenuListener(function(event, api, td, ctx, filterCtx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); }); ```

Name

Default Value

Summary

listener : function

This is the listener function which is executed at open context menu on table cell.

Name

Description

Event

Object which allows you to remove the listener post registration.

registerTableDoubleClickListener(listener) : Event

Registers a listener which runs when double-clicking on a table cell in Analyzer.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 277

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed when double-clicking on a table cell.

  • Returns

    Name
    Description

    Event

    This is the object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerTableDoubleClickListener(function(event, api, td, ctx, filterCtx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); }); ```

Name

Default Value

Summary

listener : function

This is the listener function which is executed when double-clicking on a table cell.

Name

Description

Event

This is the object which allows you to remove the listener after registration.

registerTableMouseMoveListener(listener) : Event

Registers a listener which runs when a user moves the mouse cursor across any table cell in Analyzer.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 323

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed when a user moves the mouse cursor across any table cell in Analyzer.

  • Returns

    Name
    Description

    Event

    This is the object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerTableMouseMoveListener(function(event, api, td, ctx, filterCtx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which is executed when a user moves the mouse cursor across any table cell in Analyzer.

Name

Description

Event

This is the object which allows you to remove the listener after registration.

registerTableMouseOverListener(listener) : Event

Registers a listener which runs when a user positions the mouse cursor over any table cell in Analyzer.

  • Since

5.4

  • Source

javascript/scripts/cv_api_event.js, line 300

  • Parameters

    Name
    Default Value
    Summary

    listener : function

    This is the listener function which is executed when a user positions the mouse cursor over any table cell in Analyzer.

  • Returns

    Name
    Description

    Event

    This is the object which allows you to remove the listener after registration.

  • Example

cv.api.event.registerTableMouseOverListener(function(event, api, td, ctx, filterCtx) { // Perform Action on api.* event.preventDefault(); event.stopImmediatePropagation(); });

```

Name

Default Value

Summary

listener : function

This is the listener function which is executed when a user positions the mouse cursor over any table cell in Analyzer.

Name

Description

Event

This is the object which allows you to remove the listener after registration.

Last updated

Was this helpful?