I’m trying to use webix with some none standard backend, so I need proxy object. But I’m not quite sure what is the right way.
I read http://docs.webix.com/desktop__server_proxy.html
there is sample code:
webix.proxy.myCustomName = {
$proxy:true,
prop1:value1,
load:function(view, callback){
webix.ajax(this.source, callback, view);
},
save:function(view, update, dp, callback){
webix.ajax().post(url, data, callback);
}
};
Also I read sample code http://docs.webix.com/samples/15_datatable/16_dyn_loading/07_dyn_proxy.html
load:function(view, callback, details){
console.log(details);
if (details){
var data = [];
for (var i=0; i<details.count; i++)
data.push("x"+(i+1+details.from));
webix.delay(function(){
webix.ajax.$callback(view, callback, {
pos:details.from,
data:data
});
});
} else {
webix.ajax.$callback(view, callback, {
total_count:100,
data:["1","2","3","4","5"]
});
}
}
This code uses webix.ajax.$callback that’s not even from official documentation.
And I can’t find anywhere what parameters (and in what case) could save and load functions have