Data lazy loading in DataTables 1.9
Data lazy loading in DataTables 1.9
yzhang1121
Posts: 5Questions: 0Answers: 0
Hi, Allen,
I saw your answer to an old discussion about lazy loading. You referred to this page: http://datatables.net/examples/server_side/pipeline.html. I copied the code to my file. It worked well. But I got an error:
TypeError: json.aaData is undefined
json.aaData.splice(0, iRequestStart - oCache.iCacheLower);
What do I miss something here? I am using Datatables 1.9.
Thank you for your help,
Yin
I saw your answer to an old discussion about lazy loading. You referred to this page: http://datatables.net/examples/server_side/pipeline.html. I copied the code to my file. It worked well. But I got an error:
TypeError: json.aaData is undefined
json.aaData.splice(0, iRequestStart - oCache.iCacheLower);
What do I miss something here? I am using Datatables 1.9.
Thank you for your help,
Yin
This discussion has been closed.
Replies
Allan
Sorry for the delay. I looked into your code. If bNeedServer is true, my report is ok. No errors. But if bNeedServer is not true, the code goes to this branch:
json = jQuery.extend(true, {}, oCache.lastJson);
//console.log(oCache.lastJson);
json.sEcho = sEcho; /* Update the echo for each response */
json.aaData.splice(0, iRequestStart - oCache.iCacheLower);
json.aaData.splice(iRequestLength, json.aaData.length);
fnCallback(json);
return;
console.log(oCache.lastJson) returned undefined. What should I modify here?
Thanks,
Yin
Allan