1. #1
    Sencha User
    Join Date
    Jun 2012
    Posts
    45
    Answers
    2
    Vote Rating
    0
    cooperka is on a distinguished road

      0  

    Default Answered: Loading a store doesn't update the DataView

    Answered: Loading a store doesn't update the DataView


    I have a simple app (attached below) that loads data from a local Json file into a store and displays it in a DataView. When you press the 'Refresh' button it changes the store URL to a different local Json file and loads the store again. However, the DataView does not refresh like it's supposed to. Am I doing something wrong?

    Button tap event:
    Code:
    var store = Ext.StoreMgr.get('MyJsonStore');
    
    store.getProxy().url = 'item2.json';
    console.log(store.getProxy().url);
    
    store.load();
    Json store:
    Code:
    Ext.define('MyApp.store.MyJsonStore', {
        extend: 'Ext.data.Store',
        requires: [
            'MyApp.model.MyModel'
        ],
    
        config: {
            autoLoad: true,
            model: 'MyApp.model.MyModel',
            storeId: 'MyJsonStore',
            proxy: {
                type: 'ajax',
                url: 'item1.json',
                reader: {
                    type: 'json',
                    rootProperty: 'venueInfo'
                }
            }
        }
    });
    storeRefresh.xda
    storeRefresh.zip

  2. Code:
    var store = Ext.StoreMgr.get('MyJsonStore');
    
    // store.getProxy().url = 'item2.json';
    store.getProxy().setUrl('item2.json');
    store.load();

  3. #2
    Sencha User
    Join Date
    Apr 2012
    Location
    Toronto, Canada
    Posts
    92
    Answers
    20
    Vote Rating
    12
    iSmartDevice is on a distinguished road

      0  

    Default


    Code:
    var store = Ext.StoreMgr.get('MyJsonStore');
    
    // store.getProxy().url = 'item2.json';
    store.getProxy().setUrl('item2.json');
    store.load();

  4. #3
    Sencha User
    Join Date
    Jun 2012
    Posts
    45
    Answers
    2
    Vote Rating
    0
    cooperka is on a distinguished road

      0  

    Default


    Wonderful thank you!

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