EquationProcessPanel.getCurrentState

Syntax

getCurrentState ();

Description

The getCurrentState method returns object of the current state for the Missing Data Treatment navigation bar component.

Example

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 the panel that should contain the Missing Data Treatment navigation panel component
var equationProcessPanel = workbookBox.getPropertyBarView().getEquationProcessPanel();
//Subscribe to event of requesting data loading for component drop-down list
equationProcessPanel.NeedFillSpecifiedVector.add(function()
	{
		alert('Event of requesting data loading for component drop-down list  of the Missing Data Treatment navigation panel occurred')
	});
//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 new data source
tsService.setSelectedSeries(wbk2, [1], [0]);
var setSourceButt = new PP.Ui.Button({
	ParentNode: document.body, //Parent DOM node
	Content: "Set Source", //Subscription      
	Click: PP.Delegate(onClickSetSource)     
	}); 
function onClickSetSource()
	{
		//Set new data source for the Missing Data Treatment navigation panel component
		equationProcessPanel.setSource(wbk2);
		//Refresh
		equationProcessPanel.refresh();
	} 
equationProcessPanel.ControlChanged = new PP.Delegate(onStateChanged);
function onStateChanged(sender, args)
	{
		//Get CurrentState from the Missing Data Treatment navigation panel component
		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 properties panel, select Series > Missing Data Treatment, next choose a new source in the drop-down list and click the Set Source button. The source will return to initial value.

See also:

EquationProcessPanel