i have reviewed, in that example from client side revision id is passed automatically with data, do i need to enable it by making some changes in my code for client side?
Support Forum
Yes your server side needs to check the revision and reject outdated requests. In the aforementioned example it is this PHP
code:
public function checkRevision($revision)
{
if ($revision && $this->getRevision() > intval($revision)) {
throw new Exception('Client data snapshot is outdated please reload you stores before.', E_APP_OUTDATED_REVISION);
}
}
Note: You could ignore the revision whatsoever but it is not recommended.
saki wrote: ↑Wed Sep 09, 2020 4:05 pmYes your server side needs to check the revision and reject outdated requests. In the aforementioned example it is this
PHP
code:public function checkRevision($revision) { if ($revision && $this->getRevision() > intval($revision)) { throw new Exception('Client data snapshot is outdated please reload you stores before.', E_APP_OUTDATED_REVISION); } }
Note: You could ignore the revision whatsoever but it is not recommended.
Thanks!! but my question is from client side i don't see revision sent to server..
In your example it is sending revision from front end at start
shaveta, you can check informations about revision here: https://www.bryntum.com/docs/scheduler/#Scheduler/crud/AbstractCrudManager#property-revision
Also the blog post that explain about crud manager: https://www.bryntum.com/blog/introducing-the-crud-manager/
But basically the revision was sent on parameter, because it come from server.
- You load the data on launch app
- Your server data come with revision field with a revision number
- On sync, gantt will send data and also send this revision number received by server
Try to send revision by your server when load the data always on load and on save, then you will see it coming together with data on parameters when you call the request by project.sync method.
Best regards,
Fabio
fabio.policeno wrote: ↑Wed Sep 09, 2020 7:40 pmshaveta, you can check informations about revision here: https://www.bryntum.com/docs/scheduler/#Scheduler/crud/AbstractCrudManager#property-revision
Also the blog post that explain about crud manager: https://www.bryntum.com/blog/introducing-the-crud-manager/
But basically the revision was sent on parameter, because it come from server.
- You load the data on launch app
- Your server data come with revision field with a revision number
- On sync, gantt will send data and also send this revision number received by server
Try to send revision by your server when load the data always on load and on save, then you will see it coming together with data on parameters when you call the request by project.sync method.
Thanks!!