SmartGWT 6.0-p20171202
I have this use case:
I want to have a list grid where I do not load any data initially (i.e. autofetchdata = false). Then at a later time, when the user does a certain thing, I want to fetch data from the server with an integer as a filter criteria.
I have done this previously in many places, but with autoFetchData on and an "initialcriteria", which I later change depending on what the user does.
However, in this case, i.e. i have auto fetch off, and I later perform the fetch like this:
I noticed something that feels strange:
On the server, I see that the first X rows are fetched as normal, depending on the height of the list grid:
ObserverImageWebService;fetch, locid: 4, start: 0, end: 123
But then, new requests arrive right away, which usually doesn't happen until the user scrolls down!:
ObserverImageWebService;fetch, locid: 4, start: 123, end: 198
ObserverImageWebService;fetch, locid: 4, start: 198, end: 273
Perhaps there is something simple I'm missing or not understanding, and I really hope you can help me out. How can I get incremental, "scrolling-based" data fetches without autofetch and using filterdata? Is this even possible?
Thankful for pointers.
I have this use case:
I want to have a list grid where I do not load any data initially (i.e. autofetchdata = false). Then at a later time, when the user does a certain thing, I want to fetch data from the server with an integer as a filter criteria.
I have done this previously in many places, but with autoFetchData on and an "initialcriteria", which I later change depending on what the user does.
However, in this case, i.e. i have auto fetch off, and I later perform the fetch like this:
Code:
Criteria filter = new Criteria(); filter.addCriteria(NubaClientServerConstants.FIELD_LOCATIONID, locationId); listGrid.setData(Constants.EMPTY_DATA);//in case fetch goes wrong I want the old data gone listGrid.filterData(filter);
On the server, I see that the first X rows are fetched as normal, depending on the height of the list grid:
ObserverImageWebService;fetch, locid: 4, start: 0, end: 123
But then, new requests arrive right away, which usually doesn't happen until the user scrolls down!:
ObserverImageWebService;fetch, locid: 4, start: 123, end: 198
ObserverImageWebService;fetch, locid: 4, start: 198, end: 273
Perhaps there is something simple I'm missing or not understanding, and I really hope you can help me out. How can I get incremental, "scrolling-based" data fetches without autofetch and using filterdata? Is this even possible?
Thankful for pointers.
Comment