Documentation

getState

retrieves the current state of the specified view

object getState(string id,boolean childs);

Parameters

idstringthe view id
childsbooleandefines whether the state object besides configuration of the specified view should contain configuration of its childs. By default - false

Returns

objectthe state object

See also

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 ans restore the information about inner configuration of the view (selection, sorting direction etc.).

Back to top