fnServerData is called by events not related to the DataTable.
fnServerData is called by events not related to the DataTable.

My dataTable is using ServerSide processing. The table is located in a OWF Widget in the OWF Framework, where it is in the 2nd of 3 tabs.
The problem is, when I resize the the OWF WIdget frame, fnServerData gets called. WHen I switch tabs, fnServerData gets called.
The worst of this is then when switching tabs and coming back to the tab where my dataTable resides, the table will no longer re-render to
reflect the contents received from the server.
var tableOptions =
{
"aoColumnDefs": sseItsmScope.columns,
"aaSorting": [[ 0, "desc" ]],
"bDeferRender": false,
"bInfo": true,
"bSortClasses": false,
"bJQueryUI": true,
"iDisplayLength": 10,
"bAutoWidth": false,
"bStateSave": false,
"sPaginationType": "full_numbers",
"cache": false,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": url,
"fnServerData": function ( sSource, aoData, fnCallback )
{
// Fix for [2] problem issues which call fnServerData().
// -- Clicking TextExpand More/Less
// -- Clicking on another widget tab
if (( sseItsmScope.checkStackTrace ( "cybersa.TextExpand" ) == true ) ||
( scriptScope.tabs.isOpen ( scriptScope.ITSM_TAB ) == false))
{
// Every firing of this function requires incrementing sEcho.
sseItsmScope.serverFetchCount++; // sEcho needs help !!
return ( false );
}
else
{
aoData[0].value = sseItsmScope.serverFetchCount; // sEcho needs help !!
$.ajax({
"dataType": 'json',
"contentType": "text/plain",
"type": "PUT",
"url": sSource,
"data": JSON.stringify(aoData),
"success": function (json)
{
/.. do some stuff..
json.aaData = result;
json.sEcho = sseItsmScope.serverFetchCount++; // sEcho needs help !!
fnCallback(json);
}
}); // $.ajax({
} // if()
} // "fnServerData": function
}; // var tableOptions ...
sseItsmScope.dataTable =
$( "#" + sseItsmScope.tableId ).dataTable ( tableOptions );
$( "#" + sseItsmScope.tableId ).dataTable ( tableOptions );
The problem is, when I resize the the OWF WIdget frame, fnServerData gets called. WHen I switch tabs, fnServerData gets called.
The worst of this is then when switching tabs and coming back to the tab where my dataTable resides, the table will no longer re-render to
reflect the contents received from the server.
var tableOptions =
{
"aoColumnDefs": sseItsmScope.columns,
"aaSorting": [[ 0, "desc" ]],
"bDeferRender": false,
"bInfo": true,
"bSortClasses": false,
"bJQueryUI": true,
"iDisplayLength": 10,
"bAutoWidth": false,
"bStateSave": false,
"sPaginationType": "full_numbers",
"cache": false,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": url,
"fnServerData": function ( sSource, aoData, fnCallback )
{
// Fix for [2] problem issues which call fnServerData().
// -- Clicking TextExpand More/Less
// -- Clicking on another widget tab
if (( sseItsmScope.checkStackTrace ( "cybersa.TextExpand" ) == true ) ||
( scriptScope.tabs.isOpen ( scriptScope.ITSM_TAB ) == false))
{
// Every firing of this function requires incrementing sEcho.
sseItsmScope.serverFetchCount++; // sEcho needs help !!
return ( false );
}
else
{
aoData[0].value = sseItsmScope.serverFetchCount; // sEcho needs help !!
$.ajax({
"dataType": 'json',
"contentType": "text/plain",
"type": "PUT",
"url": sSource,
"data": JSON.stringify(aoData),
"success": function (json)
{
/.. do some stuff..
json.aaData = result;
json.sEcho = sseItsmScope.serverFetchCount++; // sEcho needs help !!
fnCallback(json);
}
}); // $.ajax({
} // if()
} // "fnServerData": function
}; // var tableOptions ...
sseItsmScope.dataTable =
$( "#" + sseItsmScope.tableId ).dataTable ( tableOptions );
$( "#" + sseItsmScope.tableId ).dataTable ( tableOptions );
This discussion has been closed.
Replies
Allan
I cannot point you to my link because it is govt/non-public.