1. #1
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Budapest
    Posts
    89
    Vote Rating
    2
    zmagyar is on a distinguished road

      0  

    Default New base class for stores

    New base class for stores


    I would like to add a listener to several stores in my application. Instead of defining the listener for each stores it would be more elegant to define a new store class where the listeners defined and use that class as the base class of my stores. I.e. instead of having

    Code:
    Ext.define('MyApp.store.offlineCustomer', {
        extend: 'Ext.data.Store',
    I would like to have

    Code:
    Ext.define('MyApp.store.offlineCustomer', {
        extend: 'Ext.data.MyStore',
    where MyStore is the class where the shared listeners are defined.

    Is there any way to implement it in Architect? Or the only one solution is to add the listeners to each class individually?

  2. #2
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    497
    Vote Rating
    41
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    at some point I would like to do the same thing. in my case, i want a listener to intercept all ajax calls from any store i define to determine if server session is still active.

    did you try to make this work using your sample below? if not, give it a whirl and let us know what you experience.

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Location
    Budapest
    Posts
    89
    Vote Rating
    2
    zmagyar is on a distinguished road

      0  

    Default


    I can not see how can I define the base class in Architect. When the store is created in Architect the code in the sample is auto generated. So I can not see any way to add my 'extend' bit.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar