Server side processing irregularity.. (or not)

Server side processing irregularity.. (or not)

hamishbbhamishbb Posts: 1Questions: 0Answers: 0
edited August 2011 in General
Hello,

I have a project which is using the following code below. It works fine.. I'm extremely happy with data tables etc.

However if I add one more column, from 23 to 24 it stops working with no error reports (JavaScript or from data tables mentioning ill formed JSON data). I just receive the message from bProccessing saying "processing..." and it never seems to recover.

If I then remove the "bServiceSide": true - it starts working. Of course It then downloads all records and paginates on the screen. This isn't the preferred behaviour; I really need pagination to occur via the AJAX call back.

While column counts from 1-23 and it works fine.. but as soon as I hit 24 columns total it falls over.
I can also of course remove the ajax source completely and have 24 plus columns and the pagination works fine.

I think the key here is that bServerside seem's to fall over with my code once I hit a column count of 24+. I've checked the data that is returned from the server from the ajax calls and it looks fine!! I mean it actually works with out the bServerside an downloads all the data in one chunk; so it must be formatted right?

I've also added removed columns below the magical 23 numerous times to make sure i'm just not forgetting something simple...

Another curious thing I noticed was that I could form the table with 24+ columns, send 24+ columns of data in the JSON return and leave aoColumns with only 23 items.. and it partially worked (i.e. it rendered the first 23 columns). However as soon as I made aoColumns 24+ in size it fell over again or if I removed the aoColumns declaration completely...

I hope this makes sense as it's after midnight here and I've been cursing this piece of code for many many many hours trying to work it out :)

Perhaps someone will tell me something really obvious I just don';t know about... I hope so!!

Thanks a bunch

Other info you might need:

Datatables 1.8.1
jquery-1.6.1
jquery-ui-1.8.14

Other Java running:

jquery.validate
ZeroClipboard.js
TableTools.min.js
FixedColumns.min.js
Scroller.min.js


[code]
oTable1 = $('#searchResultsTable').dataTable( {
"bScrollInfinite": false,
"bScrollCollapse": true,
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": js_live_site + "/classes/jobs.ajax.php?atask=orderssql&search_id=" + search_id + "&search_originators=" + search_originators,
"bPaginate": true,
"bJQueryUI": true,
"iDisplayLength": 20,
"aaSorting": [[0,'desc']],
"aoColumns": [
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class', "bSortable": false },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' , "bSortable": false },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' , "bSortable": false },
{ "sClass": 'nowrap_class', "bSortable": false },
{ "sClass": 'nowrap_class', "bSortable": false },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class' },
{ "sClass": 'nowrap_class', "bVisible": false }
],
"sDom": '<"H"Tpfr>t<"F"pi>',

"oTableTools": {
"sSwfPath": "' + js_live_site + '/swf/copy_cvs_xls_pdf.swf",
"aButtons": [
{
"sExtends": "edit_veh",
"sButtonText": "Edit"
},{
"sExtends": "delete_veh",
"sButtonText": "Make Inactive"
},
{
"sExtends": "spacerbutton",
"sButtonText": " "
},
"print",
{
"sExtends": "collection",
"sButtonText": "Save",
"aButtons": [ "csv", "xls", "pdf" ]
},
{
"sExtends": "spacerbutton",
"sButtonText": " "
},
{
"sExtends": "left_page",
"sButtonText": "<<"
},{
"sExtends": "right_page",
"sButtonText": ">>"
}
]
}

} );

[/code]
This discussion has been closed.