1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    15
    Vote Rating
    1
    raye is on a distinguished road

      0  

    Default Answered: How to reference store and define control callback in controller?

    Answered: How to reference store and define control callback in controller?


    Hi ALL,
    I would like to reference a store and define handlers for it's events. Here is the case:

    Ext.define('MobileApp.controller.ContactTag', {
    extend: 'Ext.app.Controller',
    ......
    config: {
    refs: {
    storeContactTags: {
    selector: '#storeContactTag'
    }
    },
    control: {
    storeContactTags: {
    load: 'storeContactTagLoaded'
    }
    }
    }
    ....
    }

    ==============
    Ext.define('MobileApp.store.ContactTag', {
    extend: 'Ext.data.Stroe',
    config: {
    id: 'storeContactTag'
    ....
    }
    }

    The store is used for a Ext.List obj. When ContactTags performs CRUD, all relevant views (like form.Panel) should update at the same time.

    I suppose to do the definition in controller. But it doesn't work as I though. Therefore I have to specify a listener in the store (that I think it is not appropriate):

    Ext.define('MobileApp.store.ContactTag', {
    extend: 'Ext.data.Stroe',
    listeners: {
    load: function(store, records, successful, operation, eOpts) {
    ......
    }
    }
    }



    Anyone has better solutions??


  2. Store is not a component, so you can not use the refs or control to locate the Store,
    give the Store a storeId, then use Ext.getStore('storeId').load(...)

  3. #2
    Sencha User
    Join Date
    Apr 2012
    Location
    ShenZhen, China
    Posts
    52
    Answers
    11
    Vote Rating
    2
    liaoyiwu is on a distinguished road

      0  

    Default


    Store is not a component, so you can not use the refs or control to locate the Store,
    give the Store a storeId, then use Ext.getStore('storeId').load(...)

Thread Participants: 1

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