Threaded View

  1. #1
    Sencha User Arg0n's Avatar
    Join Date
    Apr 2012
    Vote Rating
    Arg0n will become famous soon enough Arg0n will become famous soon enough


    Default Answered: Store global load event in MVC

    Answered: Store global load event in MVC

    I want to listen on load of all stores. Is there a way I can do it in a MVC structure? :x

    I already thought about extending from the '' class, but it wont work, because the class extinding it needs to be a store itself. So I read about the observable class, but this seems to be the wrong way too...
    I don't want to register a load listener for each store I have... I would lik eto have global load listener.

  2. I tested just now with the following and it worked for me (using ExtJS 4.1.1a - I think you need 4.1.1 or higher for Ext.application's init method to fire - was a bug fix)

    inside my Ext.application - moved setting up the global ( to the init function of Ext.application instead.
    init: function () {
        var me = this; = me;'add', function (i, store) {
            store.on('load', function () {        // or datachanged or whatever you want
      'storeload', store);
    Now from any controller you can add a listener for 'storeload'. The below snippet I put in one of my controller's init function
    me.application.on('storeload', function (store) { console.log(store); });
    That's how I saw ... I think Tommy Maintz ... can't remember ... fire and handle application level events and it's worked well for me.

Thread Participants: 2

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi