getCurrentState ();
The getCurrentState method returns object of the current state for the Missing Data Treatment navigation bar component.
To execute the example, the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component), and a workbook with the 5183 key, also the following code must be added in the document opening event handler:
//Get panel that must contain component of the Missing Data Treatment navigation panel var equationProcessPanel = workbookBox.getPropertyBarView().getEquationProcessPanel(); //Subscribe to event of requesting data loading for drop-down component list equationProcessPanel.NeedFillSpecifiedVector.add(function() { alert('Event of requesting data loading for drop-down component list of the Missing Data Treatment navigation panel') }); //Request new workbook var NewKEY = 5183; tsService.editDocument(NewKEY, onSecondOpened); function onSecondOpened(sender, args) { //Get new data source var wbk2 = args.Workbook; //Set selected series in the new data source tsService.setSelectedSeries(wbk2, [1], [0]); var setSourceButt = new PP.Ui.Button({ ParentNode: document.body, //DOM parent node Content: "Set Source", //Title Click: PP.Delegate(onClickSetSource) }); function onClickSetSource() { //Set new data source for component of the Missing Data Treatment navigation panel equationProcessPanel.setSource(wbk2); //Refresh equationProcessPanel.refresh(); } equationProcessPanel.ControlChanged = new PP.Delegate(onStateChanged); function onStateChanged(sender, args) { //Get CurrentState from component of the Missing Data Treatment navigation panel var state = equationProcessPanel.getCurrentState(); alert(JSON.stringify(state)); } }
After executing the example the HTML page will contain the WorkbookBox component and a button named Set Source. To execute the example, open the workbook side panel, select Series > Missing Data Treatment, next choose a new source in drop-down menu and click the Set Source button. The source will return to initial value.
See also: