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.

Hybrid View

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2011
    Posts
    33
    Vote Rating
    3
    wsi2 is on a distinguished road

      1  

    Exclamation [4.0.2 RC3] Inserts, removes, and/or filtering on buffered grids do not persist

    [4.0.2 RC3] Inserts, removes, and/or filtering on buffered grids do not persist


    Bug
    Inserts, removes, and/or filtering on buffered grids do not persist. Only the current page is affected, not the entire dataset.

    Environment
    OS: Windows 7 Professional SP1 x64
    ExtJS: 4.0.2 RC3
    Browsers:
    • Google Chrome 12.0.742.91
    • Firefox 4.0.1
    • Internet Explorer 9.0.8112.16421
    • Safari 5.0.5 (7533.21.1)
    • Opera 11.11 (Build 2109)

    Steps to reproduce:
    1. Append the code below to the buffer-grid example (examples/grid/buffer-grid.js)
      Code:
      var add = Ext.create('Ext.button.Button', {
      	text: 'add record',
      	renderTo: Ext.getBody().createChild()
      });
      add.on('click', function() {
      	var d = createFakeData(1);
      	store.insert(0, Ext.ModelManager.create(d[0], 'Employee'));
      }, this);
      
      var remove = Ext.create('Ext.button.Button', {
      	text: 'remove record',
      	renderTo: Ext.getBody().createChild()
      });
      remove.on('click', function() {
      	store.removeAt(0);
      }, this);
      
      var filter = Ext.create('Ext.button.Button', {
      	text: 'filter',
      	renderTo: Ext.getBody().createChild()
      });
      filter.on('click', function() {
      	store.filterBy(function(record, id) {
      		if (record.get('rating') >= 3) {
      			return true
      		}
      		return false;
      	}, this);
      }, this);
    2. Set store.pageSize = 19 (or grid.height = 1200) in order to view the top of the dataset later on. This alteration is needed due to a different bug introduced in 4.0.2.
    3. Click "add record". Note a new record is inserted at the top, and existing records shift down as expected. However, the sequence is numbered 1, 2, 2, 3, 4....
    4. Scroll all the way down. The expected end index of 5001 is not there. If the end index is only 4994, that is due to a different bug.
    5. Scroll all the way up. The newly added record at index 1 is no longer there. The original record at index 1 remains.
    6. Optionally, you may choose to refresh the page before the next set of tests. It doesn't effect the outcome whether you do or not.
    7. Click "remove record". Note the record at index 1 is removed as expected. Note that an empty space exists where the record at index store.pageSize + 1 is expected.
    8. Scroll all the way down. Note the index is still 5000 (or 4994), not the expected 4999.
    9. Scroll all the way up. The removed record at index 1 returns.
    10. Refresh the page before the next set of tests.
    11. Click "filter". Note only records with ratings 3 or higher are shown, as expected.
    12. Scroll all the way down. Note the end index is still 5000 (or 4994) and unfiltered records are shown.
    13. Scroll all the way up. Note the filter no longer applies.

    In Firefox, it may not be possible to view the topmost record when scrolling back and forth.

    The following sequence of steps will cause empty spaces to appear: 1-5 -> 11. However, filtering after a refresh works as expected.

    Workaround:
    The heart of the workaround at the moment is to manage the full set of records, filtered and unfiltered, outside of the grid and its store. Additions, removals and filtering are processed on the externally managed sets, then swapped into the grid's store.

    The fix would be to have the grid's store properly update its prefetchData, snapshot and totalCount. However, that involves a complex sequence of scroller (verticalScroller docking/undocking) and grid view updates we are still investigating.

    The set of issues are being brought to the framework developer's attention at this opportune time in the hopes these issues will be resolved by 4.0.2 final.

  2. #2
    Ext JS Premium Member
    Join Date
    Feb 2011
    Posts
    33
    Vote Rating
    3
    wsi2 is on a distinguished road

      0  

    Default Fix Part 1: Partial solution to insert issue

    Fix Part 1: Partial solution to insert issue


    The solution below fixes persistence in a buffered grid when inserting records. For ease of testing, the buffer-grid example is used with 50 records generated instead of 5000. store.pageSize is set to 19 to bypass the bug which prevents records at the top from being viewed after scrolling down.

    Code:
    Ext.override(Ext.util.AbstractMixedCollection, {
        insert : function(index, key, obj){
            var me = this,
                myKey = key,
                myObj = obj;
    
            if (arguments.length == 2) {
                myObj = myKey;
                myKey = me.getKey(myObj);
            }
            if (me.containsKey(myKey)) {
                me.suspendEvents();
    
    			//insert != replace
    			for (var i = myKey; i < me.length; i++) {
    				me.items[i].index = i + 1;
    				me.keys[i] = i + 1;
    				me.map[i + 1] = me.items[i];
    			}
    			
                me.resumeEvents();
            }
            if (index >= me.length) {
                return me.add(myKey, myObj);
            }
            me.length++;
            Ext.Array.splice(me.items, index, 0, myObj);
            if (typeof myKey != 'undefined' && myKey !== null) {
                me.map[myKey] = myObj;
            }
            Ext.Array.splice(me.keys, index, 0, myKey);
            me.fireEvent('add', index, myObj, myKey);
            return myObj;
        }
    });
    
    Ext.override(Ext.data.Store, {
        insert: function(index, records) {
            var me = this,
                sync = false,
                i,
                record,
                len,
    			onCurrentPage = false;
    
            records = [].concat(records);
            for (i = 0, len = records.length; i < len; i++) {
                record = me.createModel(records[i]);
                record.set(me.modelDefaults);
    
    			//check whether currently paged records are affected
    			if (me.buffered) {
    				for (var j = 0; j < me.data.items.length; j++) {
    					if (me.data.items[j].index == index + i) {
    						me.data.insert(index + i, record);
    						onCurrentPage = true;
    						break;
    					}
    				}
    			} else {
    	            records[i] = record;
    				me.data.insert(index + i, record);
    			}
    
                record.join(me);
    
    			if (me.buffered) {
    				record.index = index + i;
    				me.prefetchData.insert(record.index, record);
    			}
    
                sync = sync || record.phantom === true;
            }
    
            if (me.snapshot) {
                me.snapshot.addAll(records);
            }
    
    		//update view to show new records and/or indicate the total recordset has expanded
    		if (!me.buffered || onCurrentPage) {
    			me.fireEvent('add', me, records, index);
    			me.fireEvent('datachanged', me);
    		} else {
    			//me.fireEvent('updatescrollbartocorrectheighthopefullywithoutrenderingthenderenderingthenrerenderingonlytofinallyderender', me);
    		}
    
            if (me.autoSync && sync) {
                me.sync();
            }
        }
    });
    Now the buffered grid can add records, scroll away, scroll back, and still retain the newly added records.

    Notes:
    • This fix has no effect on the issues with removing and filtering records.
    • Layout issues related to the scrollbars updating properly were avoided. Step through the code from the datachanged trigger to witness the rendering, de-rendering, rendering, then de-rendering of the verticalScrollbar. Will attempt again when layouts are more stable.
    • When records are added outside of the currently visible range, the currently visible range stays in place. This is due to 2 reasons: business logic here dictates a grid should remain parked for a smoother user experience, and it takes a lot more code in Ext.data.Store.insert() to manage offsets for store.data.
    • Ext.util.AbstractMixedCollection.insert() was actually performing a replace instead of insert. This fix may break (or fix) other code using this method.

  3. #3
    Sencha User
    Join Date
    May 2011
    Posts
    7
    Vote Rating
    0
    lokica is on a distinguished road

      0  

    Default


    I am trying make it work too. I implemented your code but without success. Anyway this feature is really missing , hope the problem will by solved soon.

  4. #4
    Ext JS Premium Member
    Join Date
    Sep 2009
    Posts
    59
    Vote Rating
    3
    wsi is on a distinguished road

      1  

    Default


    Upon further examination of the framework's code, we have come to the realization the buffer grid is only intended to work with a fixed set of data. Implementing support for inserts, removes and filtering requires massive and fundamental changes to how grids work. At this time, it is best to manage dynamic data outside of the grid before swapping in the altered dataset.

    A proper approach would:
    1. Perform inserts and removes on the entire dataset first, not the visible or filtered sets.
    2. Then perform filtering on the entire dataset.
    3. Then perform sorting on the filtered subset.
    4. Then perform paging on the sorted subset to display the visible subset.
    5. Then determine scrollbars based on the visible subset of the sorted subset.
    Additionally, empty result sets would have to be permitted at any step (the entire dataset, filtered subset, sorted subset, scrollbar determination).