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?
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.
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.