1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    106
    Answers
    5
    Vote Rating
    5
    lgertel is on a distinguished road

      0  

    Default Unanswered: Reload all stores and refresh app.

    Unanswered: Reload all stores and refresh app.


    Hello everyone.
    I have an app that retrieves information from a web server. Every time that the user launch the app, some stores get loaded at launch time.

    I want to make a button that mimics the launch of the app.
    I'm trying something like this:

    Code:
    Ext.Array.each(myApp.app.getStores(), function(record) {
       record.load(function(records, operation, success) {
          console.log(records);
          console.log('loaded records');
       }, this);
    });
    I'm not sure if this is the right aproach to do it.
    After that, I need to refresh all the components?

    Thanks and regards

  2. #2
    Sencha User
    Join Date
    Nov 2011
    Location
    England
    Posts
    135
    Answers
    11
    Vote Rating
    7
    george.m is on a distinguished road

      0  

    Default


    Why not put the store-loading code into a function and call from both the launch() when needed, and from the button handler?

Thread Participants: 1