Animal,
I think i need some help. 4.1RC1 looks good but i still have problems with buffered scrolling. If i use my old code with guaranteeRange the grid hangs and the busy dialog appears. Thats it! So i replaced guaranteeRange with loadPage but its still the same. And last try was to set autoLoad: true in the store and remove all guaranteeRange and loadPage calls. But no change. I am not using it in the standard way but it runs in 3.4 + 4.07. So could you please have a short look?
This is my store:
Code:
var bufferStore = new Ext.data.Store({
id: 'bufferStore',
pageSize: 100,
model: 'Artikel',
remoteSort: true,
proxy: myProxy,
buffered: true,
autoLoad: true
});
this is the proxy and doRequest:
Code:
Ext.define('MyProxy', {
extend: 'Ext.data.AjaxProxy',
constructor: function(config) {
MyProxy.superclass.constructor.call(this, config);
this.initConfig(config);
logInfo("MyProxy.constructor()");
},
doRequest: function(operation, callback, scope) {
logInfo("MyProxy.doRequest() starts");
pageRequest(operation, callback, scope);
logInfo("MyProxy.doRequest() ends");
return;
}
});
function pageRequest(operation, callback, scope) {
logInfo("pageRequest(" + operation.page + ", " + operation.limit + ") starts");
findArtikel3(currentText, operation.page, operation.limit, { callback:
callbackFromPageRequest.bind(this, operation, callback, scope)
});
logInfo("pageRequest() ends");
}
function callbackFromPageRequest(operation, callback, scope, data) {
logInfo("callbackFromPageRequest(" + operation.page + ", " + operation.limit + ", " + data.length + ") starts");
try {
var i, total = 0;
var records = [];
for(i = 0; i < data.length; i++) {
records.push(Ext.ModelMgr.create(data[i], 'Artikel'));
}
if(data.length > 0) {
total = data[0].count; // this is a helper to get total number of records
}
logInfo("data.length = " + data.length);
logInfo("total = " + total);
if(data.length > 0) {
var resultSet = new Ext.data.ResultSet({
records: records,
count: records.length,
total: total,
loaded: true,
success: true
});
operation.setSuccessful(true);
operation.setCompleted(true);
} else {
var resultSet = new Ext.data.ResultSet({
records: records,
count: records.length,
total: total,
loaded: false,
success: false
});
operation.setSuccessful(false);
operation.setCompleted(false);
}
operation.resultSet = resultSet;
operation.records = records;
callback.bind(scope, operation)();
}
catch(ex) { }
logInfo("callbackFromPageRequest() ends");
}
Maybe something with the ResultSet?
And finally this is my grid:
Code:
this.gridPanel = Ext.create('Ext.grid.Panel', {
frame: true,
hideCollapseTool: true,
collapseDirection : 'left',
collapsible : true,
flex: 3,
width: '100%',
height: '100%',
autoHeight: true,
autoWidth: true,
store: store,
verticalScrollerType: 'paginggridscroller',
verticalScroller: {
numFromEdge: 5,
trailingBufferZone: 10,
leadingBufferZone: 20
},
loadMask: true,
disableSelection: false,
invalidateScrollerOnRefresh: false,
columnLines: true,
columns: columns,
title: title,
viewConfig: {
stripeRows: true
},
tbar: Ext.create('widget.searchtoolbar'),
bbar: Ext.create('widget.slidertoolbar'),
layout: {
type: 'hbox',
align: 'stretch'
},
listeners:{
....
As said before it runs in 4.07. I think it has to do with the proxy???
I think i did all written in here:
http://www.sencha.com/forum/showthre...rolling-in-4.1
When i start the application doRequest is executed three times. So 300 records are fetched but the grid hangs (total number is 626).
Thank you!