In this chapter you'll know about dataProcessor, a library that will help you to process data and 'communicate' with server-side backend.
dataProcessor provides ready functionality for:
dataProcessor can be initialized in two ways:
var dp = new dhx.DataProcessor({ master:$$('mylist'), url:"validate.php" });
var dp = dhx.dp("mylist", "validate.php"); // if a dataprocessor for a component already exists, it'll be used. If not - the new one will be created.
In both cases constructor takes the same parameters. The following are commonly used:
DataProcessor lets to save data back to DB. During dataprocessor's init you can specify the appropriate server file in the second parameter of an object constructor ('url'). The simplest solution will be to use dhtmlxConnector. Also it possible to implement your custom server side code ( check dhtmlxConnector documentation for protocol details )
var dp = new dhx.DataProcessor({ master:$$('mylist'), url:"data.php" });
After that, when you need to send data back to server you should call the send method
//will save all changes in the component back to DB dp.send();