Is there some documentation on the format of the POST variables sent from the Dataprocessor from both the normal 3.6 Scheduler and from the Mobile Scheduler?
I had created my system using the normal 3.6 Scheduler and the Dataprocessor, and created a PHP file to handle the POST data from the Dataprocessor and to return a valid XML response.
The documentation for the Mobile Scheduler states that the server side logic is the same for both normal and mobile scheduler, but when I tried to integrate the mobile scheduler with my system, I discovered that the data being POSTed is different for the two systems.
From the normal 3.6 Scheduler, I get POST data like the following
start_date: 2013-01-26 12:20
end_date: 2013-01-26 13:25
text: Saturday Lunch
From the mobile Scheduler, I get POST data like the following
1359292210392_text: Sunday Afternoon Get-together
1359292210392_start_date: 2013-01-27 16:10
1359292210392_end_date: 2013-01-27 17:10
Is there any more detailed documentation on the format of what will be POSTed in various scenarios?
DataProcessor can work in two modes - single item sending or multiple items sending - thats two different format, which is show above.
docs.dhtmlx.com/doku.php?id=dhta … ding_modes
When sending multiple data at once, scheduler prepends each field name with record id. ( that is difference between two data formats shown above )
thanks for the info.
The link you posted did not work but I will try to find the info in the Dataprocessor documentation.
Looking through the Dataprocessor documentation, I think that this is the page you intended to send me to.
docs.dhtmlx.com/doku.php?id=dhtm … nfig_debug
If I have read the documentation correctly, then if I change my normal scheduler code to say
then it will add the ID number to the front of the name of each data field POSTed, and then both my normal scheduler and mobile scheduler will use the same format.
Have I got that correct?
Yep, also, if you are including dhtmlxconnector.js on the page ( which is the part of dhtmlxscheduler.js by the way ) it will switch to send-all-at-once automatically. You can call setTransactionMode to switch it back to send-one-by-one mode
Thanks for the confirmation and the additional info.
I’m not sure if you noticed this in the code I quoted above, but the two different sending methods use different values for nativeeditor_status
If you are using the “normal” scheduler then nativeeditor_status is POSTed as “inserted”
If you are using the “mobile” scheduler then nativeeditor_status is POSTed as “insert”
I have a follow-up query about this.
If I set the scheduler to use “send-all-at-once” so that I have the IDs prefixed at the front, AND I use the dhx.proxy, what will happen after usage offline when dhx.proxy detects a connection is available?
Will the server get any duplicates?
Also what would happen if a user updated an event that hadn’t yet been inserted - would the dhx.proxy just send one INSERT with the updated info?
Connector supports both formats, but for greater compatibility it must be “inserted”
If I set the scheduler to use "send-all-at-once" so that I have the IDs prefixed at the front, AND I use the dhx.proxy, what will happen after usage offline when dhx.proxy detects a connection is available?Will the server get any duplicates?
Nope. Proxy intercepts data a step before formatting, so used data interchange format doesn’t matter. Proxy object will combine all data saving requests to the same object in the one request.
Also what would happen if a user updated an event that hadn't yet been inserted - would the dhx.proxy just send one INSERT with the updated info?
Yep, insert + update will result in single insert operation.
Thanks for the additional info.
I’m not using the connector, as I need some quite extensive custom handling, so I’ve created my own handler at the server end, and it can now deal with either insert or inserted and can also handle either single or multi POST operations.
From how you explained the Proxy will operate, I should be able to add that to my system without needing any further changes at my server end.
Thanks for your help.