DataTables server-side data source doesn't work

DataTables server-side data source doesn't work

piggy181piggy181 Posts: 3Questions: 0Answers: 0
edited December 2010 in General
Dear everyone,

I've downloaded DataTables latest version. I try to test the server-side example, it doesn't work. I can see the example page, but the data doesn't load. I even try to integrate it into my own web project in JAVA, and the table doesn't show any data.

Below is a sample data returned from JAVA backend:
{"sEcho":0,"iTotalRecords":1,"iTotalDisplayRecords":1,"aaData":[["1","1","1","1","1","1","1","1"]]}

This is the code used to return the data above:
//JAVA Code
arg1.setCharacterEncoding("UTF-8");
arg1.setContentType("application/json");
arg1.getWriter().write(jSonOutput);

Replies

  • allanallan Posts: 63,512Questions: 1Answers: 10,472 Site admin
    sEcho looks wrong - it should always be 1 or higher with server-side processing. It's just an echo of what DataTables sends the server.

    Allan
This discussion has been closed.