Results 1 to 2 of 2

Thread: Reload all stores and refresh app.

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    106
    Answers
    5
    Vote Rating
    5
      0  

    Default 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
    136
    Answers
    11
    Vote Rating
    7
      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?

Posting Permissions

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