Skip to content

MindSphere Web Components
Asset Type View

The Asset Type View displays asset types available in the current tenant.

The view mode can be configured to display the asset types as listed items or in a tree view. A search field is displayed by default, but can be hidden.

Example

The following pictures show the Asset Type View in different view modes.

List

List

Tree

Tree

Interface

Selector

<mdsp-asset-type-view></mdsp-asset-type-view>

Properties

Name Type Corresponding attribute Default Description Allowed Values
context string context Configures the context of the component. See also here.
countHidden boolean count-hidden false Hides the asset type count field if true.
errorNotification boolean error-notification Enables error control if an error is thrown. This can be used for debug purposes.

For productive use, the error event should be caught and handled in the application. See also here.
locale string locale Specifies the locale in which the component is displayed.
The locales en and de are provided by default.
See also here.
localeManager LocaleManager Returns a LocaleManager object.

This can be used to add locales or to get the locale settings. See also here.
model IDataModel Returns an object for data model handling, refer to IDataModel model.
searchHidden boolean search-hidden false Hides the search field if true.
searchText string search-text Specifies the text in the search field (read or write).
selectedAssetTypeId string selected-asset-type-id Specifies the ID of the selected asset type.
sharedAssetTypes boolean shared-asset-types false Specifies whether shared asset types from other tenants are displayed.
view IViewModel Returns an object for view handling, refer to IViewModel model.
viewMode AssetTypeViewMode view-mode List Configures the view mode. - List
- Tree

Events

Name Type Description
selectedAssetTypeChanged EventEmitter<IAssetType> Triggered when a new assetType is selected.
connected EventEmitter<any> Triggered after the component is created, initialized and appended to the DOM tree.
error EventEmitter<MdspUiError> Triggered when an error occurs in the component or while accessing APIs. See also here.

Models

IAssetType
interface IAssetType {
    _links?: IAssetTypeLinks;
    aspects?: any[];
    description?: string;
    etag?: string | number;
    fileAssignments?: FileAssignment[];
    id: string;
    instantiable?: boolean;
    name?: string;
    parentTypeId?: string;
    scope?: string;
    sharing?: ISharing;
    tenantId?: string;
    variables?: any[];
}
IAssetTypeLinks
interface IAssetTypeLinks {
    self?: ILink;
    parent?: ILink;
}
IDataModel
interface IDataModel {
  // forces reload of data, e.g. re-loading the assets
  refresh(): void;
}
IViewModel
interface IViewModel {
  refresh(): void;
}

Remarks

  • The Asset Type View currently supports up to 20,000 asset types in list view mode.
  • The tree view mode currently supports up to 1,000 asset types.

Roles

  • mdsp:core.AssetManagement.xxx (Asset Management API is used)

Snippets

Refresh

The data model of the component can be refreshed, for example to update the view cyclically to get the latest asset changes:

assetTypeView.model.refresh();

Any questions left?

Ask the community


Except where otherwise noted, content on this site is licensed under the MindSphere Development License Agreement.


Last update: September 20, 2022