getCurrentState (changedCtrl);
The getCurrentState method returns object of the current state for panel component used to edit values of attributes of selected series.
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 the panel for editing values of selected series attributes
var serieAttributesPanel = workbookBox.getPropertyBarView().getSerieAttributesPanel();
var getCurrentStateButt = new PP.Ui.Button({
ParentNode: document.body, //DOM parent node
Content: "Get Current State", //Text
Click: PP.Delegate(onClickGetCurrentState)
});
function onClickGetCurrentState()
{
serieAttributesPanel.expand();
serieAttributesPanel._update();
//Return component state
currentState = serieAttributesPanel.getCurrentState();
//Output id
alert(currentState[0].id);
}
After executing the example the Get Current State is placed in HTML page. Clicking this button opens a window that contains information of the current state of panel component used to edit values of selected series' attributes.
See also: