I'm implementing a polling mechanism for my DataTables-based application and rather than writing everything from scratch, I stumbled across your plugin. I don't need the "selective updating" which is at the core of what you've done, but it's still low-hanging fruit to use DataTables LiveAjax for interval, pause, and cancel methods.
However, when I try to fire up liveAjax in a table, I encounter the following error:
if ( json[ dtSettings.liveAjax.dataSrc ][0][ dtSettings.liveAjax.rowId ] === undefined ){
I call my DT in a slightly unconventional way, but I'm not sure why it is failing:
fcapp.storedTables.sessionTable = $('#sessiontable').on('error.dt', fcapp.tables.dtErrorHandler).DataTable({
"ajax": {
"url": "/rs/sessions",
"dataSrc": function (json) {
return fcr.utils.ensureArray(json.session);
},
"headers": {
"RESTSessionSecret": sessionStorage.getItem("currentSession")
}
},
liveAjax: true,
"columns": [
{"data": "userName",
"title": "user name"
},
{"data": "remoteIP",
"title": "IP"},
{
"data": "fileName",
"title": "file"
},
{
"data": "status",
"title": "status"
},
{"data": null,
"sortable": false,
"defaultContent": fcapp.render.tools('group'),
"createdCell": function (td, cellData, rowData, row, col) {
$(td).addClass('toolcell');
}
}
],
"rowCallback": function (row, data, index) {
fcapp.render.row(row, data, index);
}
});
DataTables is 1.10.8, and it is using dataTables.bootstrap.js as well.