UI Manager

Is there a way to expand the properties that the UI Manager currently stores in localStorage? For example, the value of a checkbox.

If this is not planned or there is no ‘elegant’ way, can you point me in the right direction to hack the Webix function?

Can you provide some more information, what do you mean by “expand the property” ?

So as I understand it, UI Manager only stores height, width, gravity … maybe one other. That works fine but lets say I had a checkbox and the checkbox hides a pane. I would like UI Manager to store the checkbox property of “value=1” so that when it reloads UI, the box gets checked and the pane gets hidden. Is there a way for me to add ‘properties’ to what is saved currently by the UI Manager?

To follow-up:

I looked at the debug code in some detail and I can see how my original question is a bit confusing. In the documentation discussing ‘Saving and Restoring the Application State’ you refer to the UI Manager. I now see that the UI Manager supports a bunch of functionality.

So I am referring specifically to getState and saveState.

Let’s use a counter control as an example.

I went into webix.UIManager.setState and added “value: node.config.value” to the ‘state’ variable. I then added “node.define(‘value’, state.value);” to getState.

This does work and this ‘added parameter’ is now in localStorage.

In fact, when I close the browser and re-launch, the counter does populate with the stored value. However, there is some weird behavior. Unlike the rest of the stored UI, if I refresh the browser, the stored value does not populate.

So I guess there is more to it.

Instead of modifying the getState, setState API, it is quite easy to add a custom code that will save all values in the UI and restore after page reloading.

http://webix.com/snippet/a9da25b2

if I refresh the browser, the stored value does not populate.

It is possible, that in second scenario, code that saves data ( getState ) is not triggered.