MicroStrategy ONE

Customizing Events

Every request to MicroStrategy Web corresponds to a specific event, which in turn represents a specific user action— such as folder browsing, pivoting, or sorting— that must be performed. An event is defined by an ID, a name, and the set of the arguments that are used in processing the action. MicroStrategy Web uses events to identify both the actions that must be performed and the component that should execute the actions. These actions modify the state of the beans and, ultimately, the page that is displayed to the user. For a general introduction to event processing, see Processing Events in the Page Execution and Event Processing section of the MSDL.

Each event (that is, each WebEvent) comes with an associated list of required and optional parameters that define the specific request. Within a request, an event is identified by the evt parameter whose value represents the event ID. For example, in the parameter name/value pair, evt=4001, 4001 is the ID of the event that needs to be handled. The Event Handlers Reference contains a comprehensive list of the default names and IDs for all valid events.

This section shows you how to customize events and event handling in MicroStrategy Web— either by adding new event definitions and event handlers to the application framework or by customizing  existing events and event handlers.

New events can be added and existing ones modified simply by customizing an event definition file. A custom event handler can be created in one of the two following ways:

  • By creating a new handler of an existing type (for example, a custom event handler for an out-of-the-box data component such as a ReportBean)

    Existing event handler types are defined in EnumEventHandlerTypes.  

  • By creating a new handler of a new type (for example, a custom event handler for a custom data component)

Events and add-ons offer similar functionality. Before creating custom events, you should first become familiar with add-ons. The topic, Deciding Between Using Custom Add-ons and Custom Events, provides information to help you determine which component you should use for your customization.

When and why to customize events

You customize events when the available events and/or the way they are handled do not meet your specific requirements. This is usually due to one of the following reasons:

  1. You want to add new functionality to the application and there is no existing event available to perform the set of tasks that are needed. 

  2. The default handling of an existing event, or request for an action, is different from the one you desire. For example:

See also