AttributeFilterChanged(sender: Object, args: Object);
sender. Event source.
args. Event information. Available argument: JSON object with the Source field - wizard data source.
The AttributeFilterChanged event occurs on changing filter for the PeriodSeriesViewMaster wizard attributes dimensions.
To execute the example, the HTML page must contain the PeriodSeriesViewMaster component named pswMaster (see Example of creating the PeriodSeriesViewMaster component), and the time series database must include an attribute named BCA. Process the AttributeFilterChanged event, so that on applying a new filter the Series panel shows text of this filter and total number of dimensions in attribute tree:
// Process the AttributeFilterChanged event pswMaster.AttributeFilterChanged.add(function (sender, args) { console.log("Filter text: " + args); }); // Process the PropertyChanged event pswMaster.PropertyChanged.add(function (sender, args) { console.log("Total number of dimensions in attribute tree: " + args.getMetadata()); }); // Get the Series panel var item = pswMaster.getItems()[0]; // Get field for editing filter text var findTextBox = item._FindTextBox; // Process the event findTextBox.ImageClick.add(function (sender, args) { // Fire the AttributeFilterChanged event pswMaster.AttributeFilterChanged.fire(findTextBox, findTextBox.getContent()); // Fire the PropertyChanged event pswMaster.PropertyChanged.fire(this, new PP.Mb.Ui.PropertyChangedEventArgs({ PropertyName: PP.TS.Ui.ControlType.Filter, // Specify the number of filtered elements as a parameter Metadata: item.getSeriesTreeView().getNodes().getCount(), TypeUpdateData: [PP.TS.Ui.ViewTypeUpdate.PropertyBar] })); });
Type in BCA in the search bar and click an appropriate icon. After executing the example the browser console displays filter text and total number of dimensions in attribute tree:
Filter text: BCA
Total number of dimensions in attribute tree: 4
See also: