SelectedObjects: Array;
The SelectedObjects property contains collection of selected navigator tree objects.
The property is returned by means of the getSelectedObjects() and returns array of instances of the PP.Mb.Object class.
The property is set by means of the method: setSelectedObjects(objects: Array, fireEvent: Boolean, clearSelection: Boolean, setFocus: Boolean, scrollToFocus: Boolean).
Parameters:
objects. Array of object keys that must be selected in the navigator tree.
fireEvent. Determines whether the ObjectListSelectionChanged event is fired on executing the method: True - the event is fired, False - the event is not fired.
clearSelection. Determines whether the old selection is cleared: True - the selection is cleared, False - the selection is remained.
setFocus. Determines whether to set focus on the first of the selected elements (True - set focus, False - do not set focus.
scrollToFocus. Determines whether to scroll the tree of objects to the focused element (True - the tree is scrolled, False - the tree is not scrolled.
To execute the example, the page must contain NavigatorBox component named navbox (see Example of Creating the NavigatorBox Component). The repository must contain objects with the 4153 and 3268 keys. Select the specified objects in the navigator tree:
navbox.setSelectedObjects([4153, 3268], true, true, true, true)
After executing the example objects with the specified keys are selected in the navigator tree. The object with the 4153 key is focused, and the tree of objects is scrolled to the object. If any objects were selected before, they are deselected.
See also: