Results 1 to 4 of 4

Thread: TreePanel/AbstractStore.Sync() new record Hierarchy issues (ExtJS 4.1.0-rc3)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Davenport, IA
    Vote Rating

    Default Answered: TreePanel/AbstractStore.Sync() new record Hierarchy issues (ExtJS 4.1.0-rc3)

    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:

    PHP Code:
    {    "Data": [{
    "text""record A",
    }, {
    "text""subRecord 1",
    }, {
    "text""record B",
    }, {
    "text""record C",
    }, {
    "text""subRecord 2",
    }, {
    "text""subRecord 3",

    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.

  2. I've got a work around working for the time being. on the ItemAppend event for the treepanel, I'm appending the parents internalId, to the new node as a new data value called clientParentId. which is then sent to the server.
    This allows it to keep track of the new nodes, and append Id's to them properly to keep my Hierarchy intact

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts