Metabase.close

Syntax

close();

Description

The close method closes connection to repository.

Example

Executing the example requires a created connection to repository named mb and service for working with dimensions named dimSrv (see Example of Creating the DimensionCombo Component).

Add a button clicking which closes the repository connection:

    var button = new PP.Ui.Button({
        Content: "Close connection",
        Click: function () {
            dimSrv.beginSyncXHR();
            mb.close();
            dimSrv.endSyncXHR();
        },
        ParentNode: document.body
    });
    mb.Closed.add(function () {
        alert("Repository connection is closed")
    });

After executing the example clicking the button closes the repository connection and pauses execution of JavaScript scripts in the page. The following message appears: Repository connection is closed.

See also:

Metabase