Setting the size limit is not related to the growing feature, it just affects the maximum number of entries used in a list binding, e.g. you have stored 1000 entries and the size limit is 500 any list control bound to these entries will just show 500.
The JSONModel is more or less a dumb data store, it does not support the growing feature as it has no knowledge of your data and how to get the overall count. To achieve this you need to implement your own list binding which computes the count of your data for your specific case. You also need a custom model which uses this list binding.
JSONModel
sap.ui.define([
"sap/ui/model/json/JSONModel",
"xxx/ListBinding"
], function(JSONModel, ListBinding) {
"use strict";
return JSONModel.extend("xxx.JSONModel", {
bindList : function(path, context, sorters, filters, parameters) {
return new ListBinding(this, path, context, sorters, filters, parameters);
};
});
});
ListBinding
sap.ui.define([
"sap/ui/model/json/JSONListBinding"
], function(ListBinding) {
"use strict";
return ListBinding.extend("xxx.ListBinding", {
// in this case the array holding the data has a count property which stores the total number of entries
getLength : function() {
var path = !this.sPath ? "count" : this.sPath + "/count";
var count = this.oModel.getProperty(path, this.oContext);
return (count) ? count : ListBinding.prototype.getLength.call(this);
}
});
});