M-Files UI Extensibility Framework
initializeDashboardManager Method
Description
Initialized the dashboard manager. Can register event listeners to react selection change events.
Parameters

shellUI : IShellUI [ in ]

The main shellUI object.

configuration : Object [ in ]

Contains the configuration data and callback methods for the dashboard manager.

dashboards Array [ optional ]

Contains the configuration data for each configured dashboard type. Each array item represents one dashboard. The array items are objects, which contains members as follows:

objectType : Long/String [ mandatory ]

The object type ID of the object type that is associated with the dashboard. I.e. the dashboard can handle these object types. Pass "*" to match all object types.

classId : Long/String [ mandatory ]

The class ID of the object class that can be handled by the dashboard. Pass "*" to match all object classes.

dashboardId : String [ mandatory ]

The id of the associated dashboard, as appears in Application Definition File (appdef.xml).

callbacks Object [ optional ]

Callback method container object.

onStarted Method [ optional ]

Called when the Dashboard Manager has been started.

onShowDashboard Method [ optional ]

Called when the Dashboard Manager is going to launch a new dashboard to show information about selected object.

objectVersionAndProperties : IObjectVersionAndProperties [ in ]

The selected object.

Return Type

Boolean; return false to cancel dashboard launching. Default content will be shown instead.

Examples
Initializing the dashboard manager
Copy Code
initializeDashboardManager( shellUI, {
    dashboards: [ { objectType : "0", classId : "0", dashboardId : "MetadataEditor" } ],
    callbacks: { 
        onStarted: function() { 
            // The callback handler code
        }
    }
} );