MetabaseDialogBase.openFoldersTo

Syntax

openFoldersTo(key: Number);

Parameters

key. Key of the folder to open in a basic dialog box with repository.

Description

The openFoldersTo method opens a folder with the specified key in a basic dialog box with repository.

Example

To execute the example, the HTML page must contain the MetabaseDialogBase component named metabaseDialogBase (see. Example of creating the MetabaseDialogBase component), and the repository must contain a folder with the key 117. Open this folder in a basic dialog box with repository:

// Determine key of the folder to be opened in the dialog box
var openToKey = 117;
// Display dialog box with the specified opened folder
metabaseDialogBase.openFoldersTo(openToKey);
PP.Navigator.MetabaseDialogBase.base.show.call(metabaseDialogBase);
// Determine path to the folder opened in dialog box
var pathToRoot = metabaseDialogBase.getPathToRoot();
var path = ""; // String containing path
for (var i in pathToRoot) {
    path += "\\";
    path += pathToRoot[i].getName();
};
// Refresh contents of the path with key
metabaseDialogBase.refresh(openToKey);
// Determine key of the folder opened in dialog box
var key = metabaseDialogBase.getParentKey();
console.log("Path to opened folder: " + path + ", folder key: " + key);

After executing the example the folder with the 117 key opens in a basic dialog box with repository:

Name of the opened folder can be see the message shown in the browser console:

Path to the opened folder: \prognozplatform7\5. Regular reports, folder key: 117

See also:

MetabaseDialogBase