Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha - Community Support Team
    Join Date
    Jun 2010
    Posts
    220
    Vote Rating
    0
    meyerovb is on a distinguished road

      0  

    Default [FIXED-213] List not refreshing snapshot when calling loadRecords

    [FIXED-213] List not refreshing snapshot when calling loadRecords


    As can be seen below, after modifying the store by calling loadData, the snapshot is not updated to reflect the latest clean data source, but instead represents the first loaded data source. I'm doing advanced filtering in my application (because NestedList is not yet inheriting from list, so I'm basically coding NestedList with filters). To workaround for now I am calling "delete store.snapshot;" before "store.loadData(..."

    Code:
    Ext.setup({ onReady: function () {
        var data = [];
        for (var x = 0; x < 100; x++) data[data.length] = { html: x };
        new Ext.List({
            fullscreen: true,
            store: new Ext.data.Store({ fields: ['html'] }),
            tpl: new Ext.XTemplate('<tpl for="."><div class="list-item">{html}</div></tpl>'),
            itemSelector: '.list-item',
            dockedItems: [{ dock: 'top', xtype: 'button', text: 'shorten list',
                handler: function () {
                    var store = this.ownerCt.getStore();
                    store.loadData([{ html: 'invisible'}]);
                    alert(store.snapshot.getCount());
                }
            }]
        }).getStore().loadData(data);
    }});

  2. #2
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Nice, two bugs with the same example.

  3. #3
    Sencha - Community Support Team
    Join Date
    Jun 2010
    Posts
    220
    Vote Rating
    0
    meyerovb is on a distinguished road

      0  

    Default


    Just out of curiosity... what's the second bug? I'm assuming the first one is that snapshot is not maintained correctly in loadRecords

  4. #4
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    19
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    http://www.sencha.com/forum/showthre...n-after-reload

    You changed the handler, but the sample is the same.

  5. #5
    Sencha User blessan's Avatar
    Join Date
    May 2010
    Posts
    316
    Vote Rating
    1
    blessan is on a distinguished road

      0  

    Default


    I didnt really understand this issue. Im have problem to get the store sorted after I add new records.

  6. #6
    Sencha - Community Support Team edspencer's Avatar
    Join Date
    Jan 2009
    Location
    Palo Alto, California
    Posts
    1,939
    Vote Rating
    7
    edspencer is a jewel in the rough edspencer is a jewel in the rough edspencer is a jewel in the rough

      0  

    Default


    I've refactored this to add records via store.add instead of the custom adding logic that used to exist inside loadData. This alleviates the snapshot issue and should standardize the loading process further.
    Ext JS Senior Software Architect
    Personal Blog: http://edspencer.net
    Twitter: http://twitter.com/edspencer
    Github: http://github.com/edspencer

  7. #7
    Sencha User netresource's Avatar
    Join Date
    Oct 2011
    Posts
    23
    Vote Rating
    0
    netresource is on a distinguished road

      0  

    Default how to fix it?

    how to fix it?


    I got this issue in my app (ST 1.1)
    how to fix it?
    thanks!

  8. #8
    Sencha User netresource's Avatar
    Join Date
    Oct 2011
    Posts
    23
    Vote Rating
    0
    netresource is on a distinguished road

      0  

    Default


    thank meyerovb,
    i resolved my problem

Similar Threads

  1. Snapshot in Store
    By harsha_velicheti in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 6 Feb 2012, 8:32 AM
  2. Refreshing a list's view
    By danvega in forum Sencha Touch 1.x: Discussion
    Replies: 2
    Last Post: 22 Jul 2010, 4:55 AM
  3. [OPEN] [FIXED] A ComboBox's empty text is not shown when calling clearInvalid
    By Jose Jeria in forum Ext GWT: Bugs (2.x)
    Replies: 2
    Last Post: 8 Sep 2009, 10:46 AM
  4. [FIXED] List.add(List) in BeanModelReader
    By sdc in forum Ext GWT: Bugs (1.x)
    Replies: 3
    Last Post: 16 Jul 2008, 11:50 PM

Thread Participants: 4

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