You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Victor Rasputnis edited this page Jul 31, 2012
·
24 revisions
When you sync() a standard Ext.data.DirectStoreExtJS is POST-ing new, modified and deleted items to the server. When the request is complete the server's reply data is applied to the store, expecting that some items can be modified by the server.
In case of Clear.data.DirectStore instead of passing around items, we pass the delta, wrapped in the ChangeObject, adopted from Adobe's LiveCycle Data Services:
Each instance of the ChangeObject contains:
The newVersion of the item, if this ChangeObject is about modified or new item. Otherwise, this property is null
The prevVersion of the item, if this ChangeObject is about modified or deleted item. Otherwise, this property is null
The array of changePropertyNames if this ChangeObject describes an update
Flags: isDelete(), isUpdate(), isCreate(). One and only one of them returns true
The array of changePropertyNames, if this ChangeObject describes an update
Flags: isDelete(), isUpdate(), isCreate(). One and only one of them returns true.
Java and JavaScript implementations of the ChangeObject - clear.data.ChangeObject - are part of clear-extjs-runtime-core.jar and Clear namespace.