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
    Touch Premium Member
    Join Date
    Oct 2011
    Posts
    11
    Vote Rating
    0
    chrwjr is on a distinguished road

      0  

    Default Answered: Clarification on filterUpdate event

    Answered: Clarification on filterUpdate event


    I am not finding a lot of documention on the 'filterUpdate' event that takes place when I select the filters from my column headings and filter the LOCAL store. The issue is probably trivial. Let's assume we are looking at a grid that list movies and studios producing those movies. Perhaps 50 or so are listed. grid.store.getCount() would return "50". Now suppose we want to select just "Disney Movies", so we go to our "Studio" column heading, check the box next to "Disney" and the list condenses/filters to show 20 movies. I am placing a listener on the "filterUpdate" event and in that function, I update the panel header that says "Filter applied: n movies displayed", where n is the count of records. However, in the function executed on "filterUpdate", the count contains the original count of 50, not the subset of 20.

    var lmovie_grid = Ext.ComponentManager.get('movie_grid');
    movie_grid.on('filterUpdate', me.onFilterUpdate, me);

    onFilterUpdate: function(grid) {
    var viewTitle = Ext.ComponentManager.get('main_panel');
    viewTitle.setTitle('Filter applied: ' + grid.store.getCount() + ' movies displayed.');

    console.log(grid.store.data.length);
    console.log(grid.store.getCount());
    }

    The console log and the panel header both display 50. When I undo the filter, they then display 20! It is as though "filterUpdate" is triggered before the store is filtered, not after.

    Am I doing something wrong? Should I be using a different event?

    Thanks for any help.
    -->

  2. See if you have better luck with the datachanged event on the store.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,519
    Answers
    3447
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Any event a filter menu fires will fire the filterupdate event. It sounds like a timing issue that your listener is fired before the store is filtered.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.
    -->

  4. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,519
    Answers
    3447
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    See if you have better luck with the datachanged event on the store.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.
    -->

  5. #4
    Touch Premium Member
    Join Date
    Oct 2011
    Posts
    11
    Vote Rating
    0
    chrwjr is on a distinguished road

      0  

    Default


    Genius! Thanks again, Mitchell.
    -->

Thread Participants: 1

Tags for this Thread