DataProcessor produces only "id"_"field-name"

Hi all,

I want to use dhtmlxGantt with my own REST-backend, that produces and consumes JSON. To enable the saving I used the following code:

var dp=new dataProcessor("/......");
dp.init(gantt);

Unfortunately, the Client always sends sth. like “<123412344_id>…” which can’t be parsed by my backend.

Is there a way, to produce normal XML or even better JSON (without the ID in front of the field-names) and send it to an URL after an update occurred within dhtmlxGantt ?

Thanks a lot in advance,
tohoe

Hello,
by default dataprocessor prepends field names with an id of related record(so it can send multiple updates in one POST). All affected ids passed in ‘ids’ parameter.
You can disable this mode with following command:

var dp = new dataProcessor(url); dp.init(gantt); dp.setTransactionMode("POST", false);//!important
Unfortunately dataprocessor do not support JSON, so you can either use XML or send updates to the server manually

Thank you very much.
It works !