getAttributeIndex (attributeId);
attributeId. Attribute identifier.
The getAttributeIndex method returns index of dictionary attribute by identifier.
To execute the example, the HTML page must contain the DimTree component named dimTree that uses the dim dictionary as its source (see. Example of Creating the DimTree Component). At least three attributes are configured for each dictionary element. Let us get the text of the last selected element by the third attribute:
attrId = dim.getAttributes()[2].id;
textLast = dim.getLastSelectedText(attrId);
textFirst = dim.getFirstSelectedText(attrId);
After executing the example the variables textLast and textFirst contain respectively texts of the last and first elements selected by the third attribute.
See also: