Results 1 to 2 of 2

Thread: store sync fails

  1. #1
    Sencha User
    Join Date
    Jun 2016
    Posts
    9

    Default store sync fails

    Hi all!
    I've found a strange issue, what am I missing here?
    I have a form with button that saves changes to record
    If I use this
    Code:
    updateHandler: function () {
        var record = this.getRecord();
        var values = this.getValues();
        record.set(values);    //store configured to autosync
        this.destroy();
    }
    my updating fails, see attached file for stacktrace

    1.jpg

    If I use
    Code:
    updateHandler: function () {
        var record = this.getRecord();
        var values = this.getValues();
        record.set(values);
        record.save(); //store autosync is off, proxy declared specially for current model
        this.destroy();
    }
    everything is OK

    What I need to change in store/model to fix this? Thanks

    ExtJs 6.2.0

  2. #2
    Sencha User
    Join Date
    Jun 2016
    Posts
    9

    Default

    I've found the solution: fields for Model were defined in Model's constructor(), when moved them to static config - all became good)

Similar Threads

  1. store.sync() multiple POST request when sync one record
    By winniwinter in forum Sencha Touch 2.x: Q&A
    Replies: 11
    Last Post: 23 May 2013, 2:43 AM
  2. Replies: 2
    Last Post: 10 Nov 2012, 7:41 AM
  3. [NOREPRO] store.sync() fails to update localStorage
    By kworam in forum Sencha Touch 2.x: Bugs
    Replies: 12
    Last Post: 29 Mar 2012, 10:01 AM

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
  •