getAttributes();
The getAttributes method returns model metadata attributes.
To execute the example, the HTML page must contain the MetaTree component named metaTree (see MetaTree Constructor). Add metadata to model and get attribute names:
// Get metadata tree model var metaSource = metaTree.getSource(); // Add metadata PP.Ufe.MetaSource.base.setMetadata.call(metaSource, expressBox.getSource().getDims()[0].getMetadata()); // Get attribute names console.log("Model metadata attributes:"); var attrs = metaSource.getAttributes(); for (var i in attrs) { console.log(attrs[i].n); }
As a result the console displays metadata model attribute names:
Model metadata attributes:
Name
Identifier
Order
See also: