Problem with sAjaxSource since update to Jquery 1.4 & Datatable 1.6.1

Problem with sAjaxSource since update to Jquery 1.4 & Datatable 1.6.1

TobiasTobias Posts: 8Questions: 0Answers: 0
edited February 2010 in General
First of all I want to thank you for this great tool, I've looked at many, many grids and tables for jquery and your DataTable is by far the best I could find!

Now to my problem: Since I updated JQery (1.3->1.4) and DataTable (1.5 -> 1.6.1), datatable get's no data from its datasource any more. Firebug tells me, that there is no call to the sAjaxSource at all. I use a custom pagination type, but that works fine with the new version of datatable after some adjustments to the interface. Additionally, I've rewritten some parts of _fnInitalise to use fnServerData if bServerSide is false, but that doesn't seem to be the problem either, for testing purposes, I reverted to the original code with no success. Any ideas?

My init-script looks like this:

[code]
oTableUser = $('#idUser').dataTable( {
"sAjaxSource": 'UserPreSelectionCall.jsp',
"fnServerData": function ( sSource, aoData, fnCallback ) {
$.ajax( {
"dataType": 'json',
"type": "POST",
"url": sSource,
"data": aoData,
"success": fnCallback
} );
},
"sDom": 'r<"tablehead"lp><"tablebody"t><"tablefoot"if>',
"bInfo": true,
"aoColumns": [
null,
null,
null,
null,
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false },
{ "bVisible": false }
],
"bAutoWidth": true,
"aaSorting": [[0,'asc']],
"bFilter": true,
"bProcessing": true,
"bPaginate": true,
"iDisplayLength": 10,
"sPaginationType": "four_button_scrolling",
"fnInitComplete": function() {
$('#idUser').show();
$('.tableinit').hide();
},
"oLanguage": {
"sProcessing": '<%= myResources.getString("DataTable.sProcessing2") %>',
"sLengthMenu": '<%= myResources.getString("DataTable.sLengthMenu") %>',
"sZeroRecords": '<%= myResources.getString("DataTable.sZeroRecords") %>',
"sInfo": '<%= myResources.getString("DataTable.sInfo") %>',
"sInfoEmpty": '<%= myResources.getString("DataTable.sInfoEmpty") %>',
"sInfoFiltered": '<%= myResources.getString("DataTable.sInfoFiltered") %>',
"sInfoPostFix": '<%= myResources.getString("DataTable.sInfoPostFix") %>',
"sSearch": '<%= myResources.getString("DataTable.sSearch") %>',
"sUrl": '<%= myResources.getString("DataTable.sUrl") %>',
"oPaginate": {
"sFirst": '<%= myResources.getString("DataTable.oPaginate.sFirst") %>',
"sPrevious": '<%= myResources.getString("DataTable.oPaginate.sPrevious") %>',
"sNext": '<%= myResources.getString("DataTable.oPaginate.sNext") %>',
"sLast": '<%= myResources.getString("DataTable.oPaginate.sLast") %>'
}
} // end "oLanguage"
} ); // end oTableUser
[/code]

Replies

  • TobiasTobias Posts: 8Questions: 0Answers: 0
    Okay, problem solved: As expected, the error was on my side, DataTable works fine. The JSON-String was malformated, JQuery now strictly expects double-quotes, my jsp returned single-quotes.
This discussion has been closed.