MetabaseObjectsListView.addObject

Syntax

addObject(object);

Parameters

object. Added class object PP.Mb.Object.

Description

The addObject method adds a repository object to component.

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 an object with the 65903 key.

//Set column width alignment by contents
list.adjustColumnsWidthByContent();
// Set focus to the element with the 65903 key
list.setFocused(65903);
// Remove this object from the list
obj = list.getFocusedObject();
key = obj.getKey();
list.deleteObject(key);
// Add the removed object
list.addObject(obj);

After executing the example, column width alignment by contents is set, the previously removed object is added.

See also:

MetabaseObjectsListView