Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Jan 2014
    Posts
    3
    Vote Rating
    0
    rapas is on a distinguished road

      0  

    Default Unanswered: Buffered store requests don't trigger beforeload/load events

    Unanswered: Buffered store requests don't trigger beforeload/load events


    Because our application has to cope with large sets of resources, we are using a buffered resource store for our ext scheduler.
    For each data request we are getting the resources and events for the concerning number of resources.

    We implemented a load event listener to be able to load the event store after new resource data has loaded.
    Furthermore we implemented a beforeload event listener to be able to add a begin and enddate argument to the load request, so that we only get the events for the current viewport.

    This works fine for the first data requests (2 in our case because we use a pagesize of 200) that are done to ensure that enough data is retrieved to fill the first pages.

    When I start to scroll down, there comes a moment that new resource data requests are done.
    This is indeed done. However, the beforeload and load event will not be triggered (although expected), which means that the begin- and enddate argument will not be added to the request any more, and the eventStore will not be loaded with new data.

    Question is what may be the reason that these events are not executed? Do i have to implement other event to be able to add logic before or after new data has loaded?

    Below the concerning code of the resource store:

    Code:
    Ext.define('Scheduler.store.ResourceStore',
    {
       extend: 'Sch.data.ResourceStore',
       model: 'Scheduler.model.ResourceModel',
    
       buffered: true,
       pageSize: 200, 
       sorters: ['Code'],
       remoteSort: true,
       purgePageCount: 5,
       leadingBufferZone: 200,
       trailingBufferZone: 25,
    
       autoLoad: true,
    
       proxy: 
       {
          type: 'rest',
          pageParam: false, //to remove param "page"
          noCache: false, //to remove param "_dc"
    
          url: 'REST/WebCharts/SchedulerChartDataWebService/getChartData',
          reader: 
          {
             type: 'json',
             root: 'result.Resources',
             totalProperty: 'result.TotalNrOfResources'
          }
       },
    
       listeners: 
       {
          load: function ResourceStore_onLoad(store) 
          {
             var data = store.proxy.reader.rawData; 
             store.eventStore.loadRawData(data);
          },
    
           beforeLoad: function ResourceStore_beforeLoad(store)
          {
             // TODO: add start and enddate argument to data request
          }
       }
    });

  2. #2
    Touch Premium Member
    Join Date
    Feb 2011
    Location
    NJ
    Posts
    311
    Answers
    59
    Vote Rating
    51
    droessner is a jewel in the rough droessner is a jewel in the rough droessner is a jewel in the rough

      1  

    Default


    Take a look at the beforeprefetch and prefetch events. These events are fired when records are prefetched in a buffered store.

    http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.data.Store-event-beforeprefetch
    http://docs.sencha.com/extjs/4.2.2/#...event-prefetch

Thread Participants: 1

Tags for this Thread