How to use in-memory data storing with JsonSystem (Itemscript JSON library)?
I am developing a GWT application in which I need to keep some state of application using Itemscript JSON library's JsonSystem.
As for the purpose I created a JsonSystem and put data inside it as follows:
GwtSystem.SYSTEM.put(GwtHttpConnector.CONFIG_URL, false); JsonSystem system = GwtSystem.SYSTEM; system.put("state","state_value");
I want to know, - how long is this data will be available? - when ever I refresh my page these data will not be available, so I doubt is this the procedure to store data in-memory, if so what is the actual procedure?
references : https://code.google.com/p/itemscript/ [3rd feature] : https://code.google.com/p/itemscript/wiki/GettingStartedGwtJava
Apparently it doesn't say on the project page but if it is a real in-memory database then you will lose the data once you refresh the page. Did you try it ?
If you want to keep the data between refreshes you can use LocalStorage. You have to dump the JsonSystem convert to a String and store in LocalStorage.