DWR and Datatable

DWR and Datatable

happytakashihappytakashi Posts: 3Questions: 0Answers: 0
edited September 2011 in General
How to use DWR with datatable ?

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    What's DWR? Direct Web Remoting for Java? All you need to do to use DataTables is output an HTML table: http://datatables.net/blog/Getting_started_with_DataTables%3A_First_steps

    Allan
  • happytakashihappytakashi Posts: 3Questions: 0Answers: 0
    Yes. DWR stands for direct web remoting. Instead of using ajax post for the server side processing, i need to make use of DWR to retrieve data from the server due to school requirement. Also, i wonder how to retrieve aoData and display the information like the normal ajax post method.

    Thank you for your help and guidance :)
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    So instead of going through an XMLHttpRequest object, you want it to go through a Java method? That's no problem, you can use fnServerData to make any call you want. The examples typically show a $.ajax call being made, but you can replace that with any call you want (for example I've see SQLite calls in AIR being made, or local HTML5 data store calls).

    The "trick" is that you need to work with JSON (I don't know if Java does that natively?). As long as the data being passed back to DataTables is in the format defined here, that it will work just fine: http://datatables.net/usage/server-side :-)

    Allan
This discussion has been closed.