MetaHierarchy.SelectedBreadcrumbAttributes

Syntax

SelectedBreadcrumbAttributes: Array;

Description

The SelectedBreadcrumbAttributes property determines the last attribute sequence defined in the breadcrumb.

Example

To execute the example, the HTML page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component component), and add the following code in the document open event handler:

//Get component for displaying and managing workbook attributes
var breadcrumb = workbookBox.getDataView().getBreadcrumb();
//Create an array of selected attributes
var selItems = [];
//Get current hierarchy
var hie = breadcrumb.getSource();
var levs = hie.getLevels();
var brCrAtts = hie.getSelectedBreadcrumbAttributes(); //Selected breadcrumb attributes
//Select all hierarchy attributes
for (var k = 0; k < levs.length; k++)
{						
	//Get level attributes
	var atts = levs[k].atts.its.it;
	if (atts.length > 0)
	{
		//Create an object containing information about selected attributes
		selItems.push({
			Id: atts[0].id,
			Key: atts[0].k,
			Name: atts[0].n
		});
	}
	break;
}
//Calculate order of selected breadcrumb attributes
breadcrumb.setSelectedAttributes(selItems, false);
//Refresh breadcrumb
breadcrumb.refreshAll();

After executing the example the MetaAttributeBreadCrumb component contains only one attribute:

See also:

MetaHierarchy