MetaAttributeBreadCrumbView.updateitemContent

Syntax

updateItemContent (attrId);

Parameters

attrId. Attribute identifier.

Description

The updateltemContent method updates text on breadcrumb chain item depending on selection in attribute dimension.

Example

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

//Get a component used to display and control workbook attributes
var breadcrumb = workbookBox.getDataView().getBreadcrumb();
//Get the first element from metaattribute collection
var mattr = breadcrumb.getMetaAttributes().getItem(0);
//Get identifier of hierarchy attribute for the first breadcrumb attribute
var attrId  = mattr.getAttributeId();
//Get attribute dimension tree
var dimTree = mattr.getTree();
//Get the current displayed dimension
var dim = dimTree.getSource();
//Select all dimension elements
dimTree.getDimTreeCtrl().getService().selectAll(dim, function (sender, asrgs)
	{
	//Set text on the breadcrumb element depending on the attribute dimension selection.
	breadcrumb.updateItemContent(attrId);
	});

After executing the example the WorkbookBox component is placed in HTML page, and a text showing the number of displayed dimensions is set for breadcrumb item. This label looks as follows:

See also:

MetaAttributeBreadCrumbView