Hi
Please can you assist.
I have data in a db which I want to add to a local storage array.
How do I use a REST service to insert the data from the DB into this Storage model? Do I just use a the normal Rest Service and Mappings?
Once I have the data in the local storage, I now need to populate a List. Do I create a Generic REST Service to do this?
This is the generic service code I have created but does not seem to work.
Appery.getRides = Appery.createClass(null, {
init : function(requestOptions) {
this.__requestOptions = $.extend({}, requestOptions);
},process : function(settings) {
settings.beforeSend(settings);
if (this.requestOptions.echo) {
settings.success(this.requestOptions.echo);
} else {
var cdata = localStorage.getItem("RideList");
settings.success(JSON.parse(cdata));
}
settings.complete('success');
}});
Many thanks