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.

    Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    16
    Vote Rating
    2
    alexmipego is on a distinguished road

      0  

    Default BufferedRenderer doesn't work with non-remote data/stores

    BufferedRenderer doesn't work with non-remote data/stores


    There is a problem with the BufferedRenderer grid's plugin that prevents it from working with data not loaded with a proxy - or at least that's the best way I can summarize it :P

    Anyhow, there are 2 scenarios where this can be seen: 1) you directly add records to a store or 2) the store is created dynamically (e.g.) on a hasMany association. Visually the grid will display just a single item and errors will start appearing on the console and the application starts to become instable/buggy.

    I've tracked down the problem to the setViewSize method of the BufferedRenderer plugin on the line:
    Code:
    end = Math.min(start + viewSize - 1, store.getTotalCount() - 1);
    
    In that line ExtJs is querying the totalCount for the store, however, stores created as I described above, do not have a totalCount set, only a count.

    I believe the best solution would be to change that call to something like (store.getTotalCount() || store.getCount()) but I'm unsure of the impact of a larger scale. Anyhow, here's a test case:

    Code:
    <html>
    	<head>
    		<LINK href="http://cdn.sencha.com/ext/beta/4.2.0.265/resources/css/ext-all.css" rel="stylesheet" type="text/css">
    		<script type="text/javascript" src="http://cdn.sencha.com/ext/beta/4.2.0.265/ext-all-dev.js"></script>
    		<script type="text/javascript">
    	Ext.require('*');
    
    
    Ext.onReady(function() {
    	Ext.define('User', {
    		extend: 'Ext.data.Model',
    		fields: [{
    			name: 'name',
    			type: 'string'
    		}]
    	});
    
    
    	var aCommonStore = window.storeRef = new Ext.data.Store({
    		model: 'User',
    		data: [{
    			name: 'Foo'
    		}, {
    			name: 'Bar'
    		}]
    	});
    
    
    	new Ext.button.Button({
    		renderTo: document.body,
    		text: 'Create',
    		handler: function() {
    			new Ext.window.Window({
    				autoShow: true,
    				layout: 'fit',
    				width: 400,
    				height: 200,
    				items: {
    					xtype: 'gridpanel',
    					plugins: [{
    						ptype: 'bufferedrenderer'
    					}],
    					store: aCommonStore,
    					columns: [{
    						dataIndex: 'name',
    						text: 'Name'
    					}]
    				}
    			});
    		}
    	});
    });
    		</script>
    	</head>
    </html>

  2. #2
    Sencha User
    Join Date
    Feb 2012
    Posts
    16
    Vote Rating
    2
    alexmipego is on a distinguished road

      0  

    Default


    This problem also seems to affect filtered stores. The scrollheigt is ajusted to fit the totalCount instead of just the "visible" items.

    I've overriden even method of BufferedRenderer that has a getTotalCount() and replaced with getCount(). Everything seems to work fine now.

  3. #3
    Sencha - Ext JS Dev Team evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    16,626
    Vote Rating
    581
    evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute evant has a reputation beyond repute

      0  

    Default


    Thanks for the test case, this one has already been resolved post B2.
    Evan Trimboli
    Sencha Developer
    Twitter - @evantrimboli
    Don't be afraid of the source code!

Thread Participants: 1