getState

retrieves the current state of the specified view

object getState(string id,boolean children);
idstringthe view id
childrenbooleandefines whether the state object besides configuration of the specified view should contain configuration of its children views. By default - false
objectthe state object

Available only in PRO Edition

Example

webix.UIManager.getState("mylayout", true);

Details

The state object reflects UI configuration of the specified view.

And it looks as in:

{
    gravity: 1
    height: 0 //returns 0 if the property isn't specified
    id: "myview"
    width: 0
}


The get/setState methods of the UIManager class is similar to the same-name methods from the DataState class.

The difference lies in the following: the UIManager methods allows you to save and restore outer visual scheme (layout) of the specified view (that allows restoring general view structure) while the DataState methods save and restore the information about inner configuration of the view (selection, sorting direction etc.).

See also
Back to top