MetabaseObjectsListView.setSelectedKeys

Syntax

setSelectedKeys(keys: Array, fireEvent: Boolean, clearSelection: Boolean);

Parameters

keys. Array of repository object keys.

fireEvent. Generation of selection event. By default - true.

clearSelection. Clearing previous selection. By default - true.

Description

The setSelectedKeys method sets an array of object keys that must be selected.

Example

To execute the example, the HTML page must contain the MetabaseObjectsListView component named list (see Example of Creating the MetabaseObjectsListView Component). The repository must contain objects with the keys 66744,67035,66815.

// Select objects with specified keys
list.setSelectedKeys([66744,67035,66815]);
// Keep only selected objects
list.loadFrom(list.getSelectedObjects());

After executing the example the objects with keys are kept.

See also:

MetabaseObjectsListView