Results 1 to 4 of 4

Thread: store.sync call back does not work on running it second time

    Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Sencha User
    Join Date
    Aug 2014
    Posts
    8
    Vote Rating
    0
      0  

    Default store.sync call back does not work on running it second time

    I have structure like store.sync({
    success: function (){},
    failure: function(){}
    });

    Problem is that if I don't hide or close my input form, and try to input twice. The first time, it will run the callback functions, however, the second time, it will not run the success or failure at all.

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,411
    Vote Rating
    1290
      0  

    Default

    So if you have something like this it will not execute:

    Code:
    store.sync({
        success : function() {
            someRecord.set('foo', 'bar');
    
            store.sync({
                success : function() {}
            });
        }
    });
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Aug 2014
    Posts
    8
    Vote Rating
    0
      0  

    Default

    I don't have any store.sync within the callback. In the callback functions, it is just simply outputing the status messages.
    Quote Originally Posted by mitchellsimoens View Post
    So if you have something like this it will not execute:

    Code:
    store.sync({
        success : function() {
            someRecord.set('foo', 'bar');
    
            store.sync({
                success : function() {}
            });
        }
    });

  4. #4
    Sencha User
    Join Date
    Aug 2014
    Posts
    8
    Vote Rating
    0
      0  

    Default

    I noticed that there is a 'callback' function except the success and failure, so is it possible store.sync will call the 'callback'? Or is the 'callback' the default function when store finishes its work?

Posting Permissions

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