Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2009
    Location
    San Mateo, CA
    Posts
    32
    Vote Rating
    3
    bergstyle is on a distinguished road

      0  

    Default Updating a TreeNode with Proxy Response Data Causes Sibling Node to Become Dirty

    Updating a TreeNode with Proxy Response Data Causes Sibling Node to Become Dirty


    Example: If you update the name of a tree node that's connected to a store + proxy, then call the sync() method of the TreeStore. The Tree will replace the updated node with the record returned from the server.

    At the end of this process the sibling node of the node you updated will be marked as dirty even though nothing changed on the sibling node.

    This consistently happens in a tree with one node containing two child nodes.

    I traced the problem to the replaceChild method in NodeInterface.js. When replaceChild calls removeChild it should call it with supressNodeUpdate equal to true. Right now it doesn't and inside removeChild on line 453 node.nextSibling.updateInfo(supressNodeUpdate) is called with supressNodeUpdate as undefined which causes the sibling's data to be marked as dirty even though none of the persisted model fields have changed.

    From what I could tell the only piece of data that changed (in my tree with one node and two children) was isFirst being set to true when it was previously false. replaceChild has a enough context to know that any changes made to sibling nodes are temporary as a child is being replaced.

  2. #2
    Touch Premium Member
    Join Date
    Jul 2011
    Posts
    6
    Vote Rating
    0
    joakim.dejong is on a distinguished road

      0  

    Default


    Quote Originally Posted by bergstyle View Post
    Example: If you update the name of a tree node that's connected to a store + proxy, then call the sync() method of the TreeStore. The Tree will replace the updated node with the record returned from the server.

    At the end of this process the sibling node of the node you updated will be marked as dirty even though nothing changed on the sibling node.

    This consistently happens in a tree with one node containing two child nodes.

    I traced the problem to the replaceChild method in NodeInterface.js. When replaceChild calls removeChild it should call it with supressNodeUpdate equal to true. Right now it doesn't and inside removeChild on line 453 node.nextSibling.updateInfo(supressNodeUpdate) is called with supressNodeUpdate as undefined which causes the sibling's data to be marked as dirty even though none of the persisted model fields have changed.

    From what I could tell the only piece of data that changed (in my tree with one node and two children) was isFirst being set to true when it was previously false. replaceChild has a enough context to know that any changes made to sibling nodes are temporary as a child is being replaced.
    I am having the same problem.
    When I call "sync()" on the TreeStore the next sibling of the changed child becomes dirty.
    When I look at the siblings' values, under "modified" it says it's Index has changed.
    The next time "sync()" is called it's the NEXT sibling that becomes dirty.
    And it goes on an on with every sync through the whole tree.
    It even happens sometimes that "destroy" is sent to the server when trying to sync although nothing has been changed or deleted.

  3. #3
    Touch Premium Member
    Join Date
    Jul 2011
    Posts
    6
    Vote Rating
    0
    joakim.dejong is on a distinguished road

      0  

    Default


    I just found that the call to removeChild() mentioned above seems to be faulty.

    Code:
    replaceChild : function(newChild, oldChild, suppressEvents) {
                        var s = oldChild ? oldChild.nextSibling : null;
                        
                        this.removeChild(oldChild, suppressEvents);
                        this.insertBefore(newChild, s, suppressEvents);
                        return oldChild;
                    }
    removeChild declaration:

    Code:
    removeChild : function(node, destroy, suppressEvents, suppressNodeUpdate)
    The parameters are mismatched.

    So if "suppressEvents" == true then "destroy" == true and that must be why sometimes my server gets the "destoy" command.

  4. #4
    Ext JS Premium Member
    Join Date
    Mar 2009
    Location
    San Mateo, CA
    Posts
    32
    Vote Rating
    3
    bergstyle is on a distinguished road

      0  

    Default


    good catch joakim.dejong that's where the bug is! hope it gets fixed in time for 4.1.

  5. #5
    Touch Premium Member
    Join Date
    Jul 2011
    Posts
    6
    Vote Rating
    0
    joakim.dejong is on a distinguished road

      0  

    Default


    Is this enough to be considered a bug report?
    Or should it be sent somewhere else also?
    Just so the developers see it and are able to fix it.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar