Hi,
I am using dhx.proxy, now I want to get local storage data, I am not able to figure out how can I get it? I have a json data and what I want is to run the data in loop taking from localstorage.
How is that done? Any idea/help/documentation?
Thanks
Hi,
Here are methods of dhx.storage.local:
docs.dhtmlx.com/touch/doku.php?i … dule_local
Are you using dhx.proxy as offline solution like in the 08_dataprocessor_proxy_offine.html sample ?
samples/10_server/02_saving/08_dataprocessor_proxy_offine.html In this case, local storage contains DataProcessor data that were not sent to the server. Do you want to get this data ?
Hi,
I am just using dhx.proxy, no dataprocessor nothing.I am getting data from server , store in proxy for offline, now I want those data to manipulate. I want to take that json data and loop in. How to manipulate json data that comes from server and get stored in proxy?
I tried getValues(), but its not working.
source = new dhx.proxy({
url: “http://localhost/example/getalljsondata”,
storage: dhx.storage.local
});
var data = source.getValues();
console.log(source);
Thanks
Hi,
Data in local storage will be updated after you load the new datasource. Also you can get data via API of the component where you apply proxy. For example, you can use serialize() method:
docs.dhtmlx.com/touch/doku.php?i … _serialize
But if this is not what you need, you can use methods of dhx.local.storage:
docs.dhtmlx.com/touch/doku.php?i … dule_local
Name of Storage item will be the same as url that you use in proxy. For example:
var storage = dhx.local.storage.get(“listdata.json”);