WillFM
6 Aug 2012, 6:07 AM
I might just be approaching it the wrong way. But I feel, that the AbstractStore sync issue is greatly flawed in the order in which it submit each new node to the server on a create call.
An example would be I created several new records in a treestore.
-record A //1
--subRecord 1 //2
-record B //3
--subRecord 2 //5
-record C //4
--subRecord 3 //6
The //#, indicates the order in which each item was created in the treepanel before being synced.
Here is what is passed to the server on the create pass of the sync:
{ "Data": [{
"id": "",
"text": "record A",
"clientId": "ext-record-1",
"parentId": "IDFromServer1"
}, {
"id": "",
"text": "subRecord 1",
"clientId": "ext-record-2",
"parentId": ""
}, {
"id": "",
"text": "record B",
"clientId": "ext-record-3",
"parentId": "IDFromServer1"
}, {
"id": "",
"text": "record C",
"clientId": "ext-record-4",
"parentId": "IDFromServer1"
}, {
"id": "",
"text": "subRecord 2",
"clientId": "ext-record-5",
"parentId": ""
}, {
"id": "",
"text": "subRecord 3",
"clientId": "ext-record-6",
"parentId": ""
}]
}
should there not be at least like a clientParentID parameter , being passed to help identify the record associations? else, shouldn't they submit in an order which indicates hierarchy?
What am I missing? I've been avoiding using newer versions of Ext because of a bug in version's passed this with a few events that were broken in later versions that my application was dependent on. but if there is a few or better way to do this in newer releases i may re-evaluate newer versions.
An example would be I created several new records in a treestore.
-record A //1
--subRecord 1 //2
-record B //3
--subRecord 2 //5
-record C //4
--subRecord 3 //6
The //#, indicates the order in which each item was created in the treepanel before being synced.
Here is what is passed to the server on the create pass of the sync:
{ "Data": [{
"id": "",
"text": "record A",
"clientId": "ext-record-1",
"parentId": "IDFromServer1"
}, {
"id": "",
"text": "subRecord 1",
"clientId": "ext-record-2",
"parentId": ""
}, {
"id": "",
"text": "record B",
"clientId": "ext-record-3",
"parentId": "IDFromServer1"
}, {
"id": "",
"text": "record C",
"clientId": "ext-record-4",
"parentId": "IDFromServer1"
}, {
"id": "",
"text": "subRecord 2",
"clientId": "ext-record-5",
"parentId": ""
}, {
"id": "",
"text": "subRecord 3",
"clientId": "ext-record-6",
"parentId": ""
}]
}
should there not be at least like a clientParentID parameter , being passed to help identify the record associations? else, shouldn't they submit in an order which indicates hierarchy?
What am I missing? I've been avoiding using newer versions of Ext because of a bug in version's passed this with a few events that were broken in later versions that my application was dependent on. but if there is a few or better way to do this in newer releases i may re-evaluate newer versions.