1. #1
    Sencha User kouphax's Avatar
    Join Date
    Mar 2007
    Location
    Belfast
    Posts
    58
    Vote Rating
    0
    kouphax is on a distinguished road

      0  

    Default [SOLVED] DirectStore not Firing Load Event

    [SOLVED] DirectStore not Firing Load Event


    Hello,

    I recently attempted to switch from a JsonStore to a DirectStore (for experimental reasons) and I can;t get the load event to fire anymore. The code for the store is below which is almost identical to the old JsonStore. Am I doing something wrong?

    Code:
    var store = new Ext.data.DirectStore({
                            idProperty: 'ID',
                            fields: ['ID', 'Title', 'Samples'],
                            directFn:SamplesActions.getCatalog,
                            listeners: {
                                load : function(s, rec) {    
                                    debugger;                    
                                    s.each(function(r) { tpl.append('sample-menu', r.data); });
                                    setTimeout(function() {
                                        Ext.get('loading').remove();
                                        Ext.fly('loading-mask').fadeOut({remove: true});
                                    }, 250);
                                }
                            }
                        });
    The direct function is being called and returning a result but the event just doesn't fire (Ext 3.0 RC2).

    Any help would be appreciated.

    James.

  2. #2
    Ext JS Premium Member stever's Avatar
    Join Date
    Mar 2007
    Posts
    1,406
    Vote Rating
    6
    stever will become famous soon enough stever will become famous soon enough

      0  

    Default


    Try this:

    Code:
    var store = new Ext.data.DirectStore({
                            idProperty: 'ID',
                            fields: ['ID', 'Title', 'Samples'],
                            directFn:SamplesActions.getCatalog,
                            paramsAsHash:false,
                            root:'',
                            listeners: {
                                load : function(s, rec) {    
                                    debugger;                    
                                    s.each(function(r) { tpl.append('sample-menu', r.data); });
                                    setTimeout(function() {
                                        Ext.get('loading').remove();
                                        Ext.fly('loading-mask').fadeOut({remove: true});
                                    }, 250);
                                }
                            }
                        });

  3. #3
    Sencha User kouphax's Avatar
    Join Date
    Mar 2007
    Location
    Belfast
    Posts
    58
    Vote Rating
    0
    kouphax is on a distinguished road

      0  

    Default


    Brilliant. This works as expected. Thanks.

Thread Participants: 1

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