Hybrid View

  1. #1

    Join Date
    Mar 2012
    Posts
    1
    Vote Rating
    0
    mikaellarsson is on a distinguished road

      0  

    Default Ext: 4.2.0 Beta: Object [object Object] has no method 'filterBy'

    Ext: 4.2.0 Beta: Object [object Object] has no method 'filterBy'


    I'm getting the following error while calling sync() on a buffered store:

    ....
    Uncaught TypeError: Object [object Object] has no method 'filterBy' ext-all-debug.js:65308
    Ext.define.getNewRecords ext-all-debug.js:65308
    Ext.define.sync ext-all-debug.js:61855
    buffer-grid.js:124
    Ext.define.fireHandler ext-all-debug.js:43790
    Ext.define.onClick ext-all-debug.js:43780
    Ext.apply.createListenerWrap.wrap ext-all-debug.js:10303
    ...

    code:
    var store = Ext.create('Ext.data.Store', {
    id: 'store',
    buffered: true,
    pageSize: 5000,
    model: 'Employee',


    proxy: {
    type: 'ajax',
    method : 'GET',
    api: {
    read: 'getEmployees.xml',
    update: 'setEmployees.html'
    },
    reader: {
    root: 'employees',
    record: 'employee',
    type: 'xml'
    },
    writer: {
    documentRoot: 'employees',
    record: 'employee',
    type: 'xml',
    writeAllFields: false
    }
    }
    });

    After some investigation on my own I noticed that a buffered store uses Ext.util.LruCache which lacks the method filterBy that Ext.util.AbstractMixedCollection has, which seems to be used on a non-buffered store.
    Can someone confirm if this is a bug or if I'm doing this the wrong way?

  2. #2
    Sencha - Ext JS Dev Team dongryphon's Avatar
    Join Date
    Jul 2009
    Posts
    1,229
    Vote Rating
    114
    dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all dongryphon is a name known to all

      1  

    Default


    The results of editing a buffered store (the prerequisite to calling sync) are not likely to be desirable. The concept of a buffered store is a large, partially available, result set. Since the entire data set is never available to the client, edits cannot be properly handled. For example, sorting and filtering cannot be updated properly because these must be handled by the server. Also, the page cache has not provision for adding or removing records.

    If you turn off the buffered config on the store, what you are doing should work fine.
    Don Griffin
    Ext JS Development Team Lead

    Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue

    "Use the source, Luke!"

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,483
    Vote Rating
    35
    Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Actually, I can see why filterBy might be wanted on a sparse store. You still might want to filter what you can see.

    filterBy is implemented in another ticket - the one about findBy.

    findBy is not supported. It's meaningless in a sparse store.

  4. #4
    Sencha Premium Member
    Join Date
    Apr 2012
    Posts
    3
    Vote Rating
    0
    Mayor_McCheese is on a distinguished road

      0  

    Default


    We are getting the same error when using store.commitchanges() on a buffered store. The only reason though is to get rid of the "dirty" red triangle on the edited cell - the actual data manipulation is handled spearately.

    Is there a better (recommended) way to remove the red triangle than commitChanges()?

  5. #5
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,338
    Vote Rating
    248
    skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of skirtle has much to be proud of

      0  

    Default


    Quote Originally Posted by Mayor_McCheese View Post
    Is there a better (recommended) way to remove the red triangle than commitChanges()?
    http://docs.sencha.com/ext-js/4-1/#!...-cfg-markDirty

  6. #6
    Ext JS Premium Member tvanzoelen's Avatar
    Join Date
    Apr 2008
    Location
    Groningen - Netherlands
    Posts
    1,108
    Vote Rating
    31
    tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about tvanzoelen has a spectacular aura about

      0  

    Default


    Code:
    findBy is not supported. It's meaningless in a sparse store.
    I disagree with that. Even on a sparse stores there should be some functions to search records in the store or in its page maps. Besides a local filter is common on retrieved records. I have that functionality to narrow down the search on retrieved records.

    I also see that the Ext.util.LruChache isn't documented yet, but in that class should be some search functionality.

    I think backwardscompatibility is lost now by introducing this new 'buffered' in version 4.2. But hopefully with that bufferedgrid plugin I don't need it anymore.

  7. #7
    Sencha Premium Member Zdeno's Avatar
    Join Date
    Nov 2009
    Location
    Prague
    Posts
    358
    Vote Rating
    15
    Zdeno will become famous soon enough

      0  

    Default


    This does not work for me in 4.2.0 with:
    PHP Code:
    config.viewConfig = {
        
    markDirty false,
        
    emptyText 'strNoItems' 
    }; 

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