PDA

View Full Version : The problem of infinite-scroll in the IE8 (version 4.2.3)



Fent2
21 Jan 2015, 10:29 PM
I use a grid with infinite-scroll to show data ,if it's store data 'total' have a large num ,
like 600000(json return from java servlet) , when drag the slip bar to end ,the 'page' only 636,
that mean the grid can not show all data when scroll to the grid bottom.
The problem only find in IE8 ,the other browser like IE6,chrome, Firfox that OK;
their some method to solve thie problem ?
ths! this my code

Fent2
21 Jan 2015, 11:01 PM
Code:

Ext.require([ 'Ext.grid.*', 'Ext.data.*', 'Ext.util.*', 'Ext.grid.plugin.BufferedRenderer' ]); Ext.onReady(function(){ Ext.define('ForumThread', { extend: 'Ext.data.Model', fields: [ {name : 'title',type : 'stirng'}, {name : 'forumtitle',type : 'stirng'} ] }); // create the Data Store var store = Ext.create('Ext.data.Store', { id: 'store', model: 'ForumThread', remoteGroup: true, // allow the grid to interact with the paging scroller by buffering buffered: true, leadingBufferZone: 300, pageSize: 100, proxy: { // load using script tags for cross domain, if the data in on the same domain as // this page, an Ajax proxy would be better type: 'ajax', // url: 'servlet/FileDownloadTest2', url:'servlet/GetData', // url:'data/test_data.json', reader: { root: 'data', totalProperty: 'total' }, // sends single sort as multi parameter simpleSortMode: true, // sends single group as multi parameter simpleGroupMode: true, // This particular service cannot sort on more than one field, so grouping === sorting. groupParam: 'sort', groupDirectionParam: 'dir' }, sorters: [{ property: 'threadid', direction: 'ASC' }], autoLoad: true, listeners: { // This particular service cannot sort on more than one field, so if grouped, disable sorting groupchange: function(store, groupers) { var sortable = !store.isGrouped(), headers = grid.headerCt.getVisibleGridColumns(), i, len = headers.length; for (i = 0; i < len; i++) { headers[i].sortable = (headers[i].sortable !== undefined) ? headers[i].sortable : sortable; } }, // This particular service cannot sort on more than one field, so if grouped, disable sorting beforeprefetch: function(store, operation) { if (operation.groupers && operation.groupers.length) { delete operation.sorters; } } } }); function renderTopic(value, p, record) { return Ext.String.format( '{0} (http://sencha.com/forum/showthread.php?t={2})', value, record.data.forumtitle, record.getId(), record.data.forumid ); } var grid = Ext.create('Ext.grid.Panel', { width: 700, height: 500, collapsible: true, title: 'ExtJS.com - Browse Forums', store: store, loadMask: true, selModel: { pruneRemoved: false }, multiSelect: true, viewConfig: { trackOver: false }, // grid columns columns:[{ tdCls: 'x-grid-cell-topic', text: "Topic", dataIndex: 'title', flex: 1, // renderer: renderTopic, sortable: true }], renderTo: Ext.getBody() }); });

Gary Schlosberg
22 Jan 2015, 1:50 PM
I couldn't find an existing bug matching this description. It can often make it easier for others to jump in and assist if you can post a working test case for folks to play with.
https://fiddle.sencha.com/#home

Fent2
22 Jan 2015, 5:42 PM
Thank you !This is my test project
This problem find in IE8(XP and WIN7),but others browser OK,like chrome,FireFox, IE6
Because the attachment to large ,so I delete some lib file from the project ,
Please add below file to the folder TestScroll\WebRoot\WEB-INF\lib,
or you can use the json file in the /data/test_data.json
commons-beanutils-1.8.3.jar
commons-collections-3.2.1.jar
commons-lang3-3.1.jar
commons-lang-2.4.jar
commons-logging-1.0.4.jar
ezmorph-1.0.3.jar
json-lib-2.1-jdk15.jar