Error: Cannot read property 'oFeatures' of null because getting oSettings, sNewSource values null
Error: Cannot read property 'oFeatures' of null because getting oSettings, sNewSource values null
Please provide solution for:
var jq = jQuery.noConflict();
var paramsKeyDevices_DeviceOverwiew_Details_PresetTesting_LastActions_table = new Array();
paramsKeyDevices_DeviceOverwiew_Details_PresetTesting_LastActions_table[0]='id';
paramsKeyDevices_DeviceOverwiew_Details_PresetTesting_LastActions_table[1]='Status';
paramsKeyDevices_DeviceOverwiew_Details_PresetTesting_LastActions_table[2]='Description';
paramsKeyDevices_DeviceOverwiew_Details_PresetTesting_LastActions_table[3]='Date';
paramsKeyDevices_DeviceOverwiew_Details_PresetTesting_LastActions_table[4]='Actions';
var filter='';
var drawCounter = 0;
function loadDataFromServerDevices_DeviceOverwiew_Details_PresetTesting_LastActions_table(filterData, targetid) {
var isFirstDraw = true;
cleanTableData(targetid);
filter = filterData;
oTableDevices_DeviceOverwiew_Details_PresetTesting_LastActions_table = jq('#'+targetid).dataTable( {
"fnDrawCallback": function() {
if (isFirstDraw && drawCounter==0) { jq('#'+targetid+'length').hide();
jq('#'+targetid+' thead>tr>th').hide();
jq('#'+targetid+'_filter').hide(); }
},
"bDestroy": true,
"bRetrieve": true,
"iDisplayStart": 0,
"iDisplayLength": 1000,
"iDisplayLength": 20,
"bLengthChange": true,
"oLanguage": {
"sLengthMenu": "Show _MENU entries ",
"sZeroRecords": "No records found",
"sInfo": "Showing START to END of TOTAL entries ",
"sInfoEmpty": "No entries are available",
"sInfoFiltered": "Search MAX",
"sSearch": "Search",
"oPaginate": {
"sFirst": "First",
"sPrevious": "Previous",
"sNext": "Next",
"sLast": "Last"
}
},
"sDom": ' rt',
"sPaginationType": "full_numbers",
"bProcessing": true,
"sAjaxSource": "/subscriptionUI/deviceOverview/lastTransactions?"+filter,
"fnRowCallback": function( nRow, aData, iDisplayIndex ) {
if (isFirstDraw) {
jq('#'+targetid+'_filter').show(); jq('#'+targetid+'_length').show();
jq('#'+targetid+' thead>tr>th').show(); isFirstDraw = false; drawCounter=drawCounter+1;
}
for(var i = 0; i < aData.length; i++) {
if(aData[i] && aData[i] != '') {
var maxLength = 20;
maxLength = 14;
if(!aData[i].match(/\s+/g) && aData[i].length > maxLength) {
var element = jq('td:eq('+i+')', nRow)
element.html(aData[i].wordWrap(maxLength, '<br/>', true) )
}}}
var formString = '';
var formid = 'Devices_DeviceOverwiew_Details_PresetTesting_LastActions_table-showXml-' + iDisplayIndex;
var xSubmitString = 'xsubmit(\'#'+ formid+'\',\'#skyw-dialog-template\')';
formString += '
';
formString += '<a href="#" onclick="xskywCall(\''+formid+'\')">';
formString += 'Show XML</a>';
jq('td:eq(4)', nRow).html( formString);
return nRow;
}
,"aoColumns": [
null,
null,
null,
null,
null
] } );
}
jq.fn.dataTableExt.oApi.fnReloadAjax = function(oSettings, sNewSource,
fnCallback, bStandingRedraw) {
if (typeof sNewSource != 'undefined' && sNewSource != null) {
oSettings.sAjaxSource = sNewSource;
}
this.oApi._fnProcessingDisplay(oSettings, true);
var that = this;
var iStart = oSettings._iDisplayStart;
oSettings.fnServerData(oSettings.sAjaxSource, null, function(json) {
/* Clear the old information from the table */
that.oApi._fnClearTable(oSettings);
/* Got the data - add it to the table */
if(json!=null){
for ( var i = 0; i < json.aaData.length; i++) {
that.oApi._fnAddData(oSettings, json.aaData[i]);
}
}
oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
that.fnDraw(that);
if (typeof bStandingRedraw != 'undefined' && bStandingRedraw === true) {
oSettings._iDisplayStart = iStart;
that.fnDraw(false);
}
that.oApi._fnProcessingDisplay(oSettings, false);
/* Callback user function - for event handlers etc */
if (typeof fnCallback == 'function' && fnCallback != null) {
fnCallback(oSettings);
}
});
}
Error is occur when i migrate jQuery version to 3.2.1 (jQuery 1.4 its working fine)
DataTable version is 1.7.X