1. #1
    Sencha Premium Member seek's Avatar
    Join Date
    Sep 2008
    Location
    Italy
    Posts
    112
    Vote Rating
    1
    seek is on a distinguished road

      0  

    Question Grid plug-in for event's store interceptor

    Grid plug-in for event's store interceptor


    Hi all,
    I'm trying to build a plugin for grid component, where store.findExact can scroll automatically across pages in order to get the correct record (if found).
    My problem is to understand how to intercept and sobstitute the respective function in the store.

    PHP Code:
    Ext.ux.autoloadOnFindExact Ext.extend(Ext.util.Observable, {
      
    init: function(grid){
        
    grid.store.un('findExact'grid.store.findExact);
        
    grid.store.on('findExact'this.findAcross);    
       },
       
    findAcross: function(fieldNamevaluestartIndex){
        var 
    ds this.store;
        
    ds.suspendEvents();
        
    ds.load({
          
    params: {start0limitds.getTotalCount() },
          
    callback: function(){
            var 
    ret ds.findExact(fieldNamevaluestartIndex);
            
    ds.resumeEvents();
            
    this.onViewRefresh();
            
    //store.getAt at the correct page
            
    return ret;
          },
          
    scopethis
        
    });
      }
    }); 
    Thanks all
    S.

  2. #2
    Sencha Premium Member seek's Avatar
    Join Date
    Sep 2008
    Location
    Italy
    Posts
    112
    Vote Rating
    1
    seek is on a distinguished road

      0  

    Default UP

    UP


    UP!