getMetaTree();
The getMetaTree method returns a tree of metadata dimensions of the TransformDialog component.
Returned value - instance of the PP.Ufe.Ui.MetaTree class.
To execute the example, the HTML page must contain the TransformDialog component named dialog (see Example of Creating the TransformDialog Component). Open the Metadata tab on the component's left panel. Get the mode of displaying dimension metadata tree nodes:
// Get a panel with dimension metadata tree PP.Object.defineProps(PP.Ufe.Ui.TransformDialog, 'LeftPanel', True); PP.Object.defineProps(PP.Ufe.Ui.TransformDialogLeftPanel, 'metaPanel', True); var expandedPanel = dialog.getLeftPanel().getmetaPanel(); // Get a mode of displaying metadata tree nodes console.log("Mode of displaying metadata tree nodes: " + expandedPanel.getMetaTree().getDisplayMode());
As a result the console displays the mode of displaying dimension metadata tree nodes:
Mode of displaying metadata tree nodes: Name
Select an element in the dimension metadata tree:
Get name of the selected tree node:
// Get name of the selected element node console.log("Name of the selected element node: " + expandedPanel.getMetaTreeSelectedNodeData().n);
As a result the console displays name of the selected tree node:
Name of the selected element node: Sources
See also: