Hello Isomorphic,
I have a ListGrid which is progressively loading the dataset from server.
So when ListGrid is initially loaded the records from 0-75 . After this when user scrolls down there is a new fetch that is triggered for 75-150 .
Here for this request for 75-150 ,initially we want to return an empty list (<status>0</status> ) and show the user a dialog stating the records are loading.
This is because we are invoking few threads which perform some logic on server.
Once the thread is done computation and results are fetched i will send the actual result set of 75-150.
We approaching this situation using updateCaches where by during the second time for the request (75-150) when we are returning the actual array we are deleting the existing current cache and updating the cache with new dataset(actual not empty array).
During the second time the request object is cleared with its current properties and it is resetted to 0-75. Even though we are sending list of 75-150 range records ,as the request properties are resetted to 0-75 and 75 empty rows are displayed in the Listgrid after which i have the my actual records from 75-150.
Not sure what i am doing wrong here and if this is a right approach. However this is what the requirement unfortunately.
Please let me know your thoughts
Thanks in advance.
I have a ListGrid which is progressively loading the dataset from server.
So when ListGrid is initially loaded the records from 0-75 . After this when user scrolls down there is a new fetch that is triggered for 75-150 .
Here for this request for 75-150 ,initially we want to return an empty list (<status>0</status> ) and show the user a dialog stating the records are loading.
This is because we are invoking few threads which perform some logic on server.
Once the thread is done computation and results are fetched i will send the actual result set of 75-150.
We approaching this situation using updateCaches where by during the second time for the request (75-150) when we are returning the actual array we are deleting the existing current cache and updating the cache with new dataset(actual not empty array).
Code:
DSRespone response = new DSResponse();
response.setOperationType(OperationType.UPDATE);
response.setData(data from server actual list);
response.setInvalidateCache(true);
updateCaches(response,existingRequestObject)Not sure what i am doing wrong here and if this is a right approach. However this is what the requirement unfortunately.
Please let me know your thoughts
Thanks in advance.