changeRubricator (wbk, meta, userCallback);
wbk. Sets workbook value.
meta. Sets metadata that contains time series database settings.
userCallback. Sets handler for operation execution end.
The changeRubricator method changes a time series database.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), the repository must contain a time series database named World Indicators with the 316903 key, and the following code must be added in the document open event handler:
var addSerieButton = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Change workbook", //Text Click: PP.Delegate(onClickAddSerie) }); function onClickAddSerie() { var updateData = [PP.TS.Ui.ViewTypeUpdate.MetaAttributeBreadcrumb, PP.TS.Ui.ViewTypeUpdate.PropertyBar]; //Create an object that presents arguments of the event fired after changing property value var propArgs = new PP.Mb.Ui.PropertyChangedEventArgs({ PropertyName: PP.TS.Ui.ControlType.ChangeRubricator, Metadata: {IsCube: False, Key: 316903, NodeText: "World Indicators", Rubrs: undefined}, TypeUpdateData: updateData }); //get information about a new database var meta = propArgs.getMetadata(); tsService.changeRubricator(wbk, meta, PP.Delegate(onRubricatorChanged)); function onRubricatorChanged(sender, args) { //Refresh the specified database elements workbookBox.getDataView().refresh(propArgs); } }
After executing the example a button named Change Workbook is placed in the HTML page. On clicking a button label that shows the source name in the breadcrumb changes. Contents of series tree will be changed, and tree nodes will show series of the new time series database.
See also: