Newbie question
Newbie question
First of all, thanks very much for this really cool JQuery plug-in. It's by far the nicest and easiest to work with of any of the data table plugins I've toyed around with, great work!
I'm a newbie to real javascript (only dabbled before), JQuery and Datatables so I apologize if this is silly but I'm working on a web-app where the general architecture is using Jersey for RESTful web-services on the server side and JQuery on the client. Datatables seems like the way to go for a good data table component. On my page I have an array of javascript objects which I have retrieved from a RESTful web service (JSON). I have looked around quite a bit but haven't seen any examples for converting an array of javascript beans into a datatable compatible array, or to otherwise bind my array of objects to the data table. Does anyone have any examples or could you provide suggestions on how to go about this in a clean/re-usable fashion?
Thanks!
G33k
I'm a newbie to real javascript (only dabbled before), JQuery and Datatables so I apologize if this is silly but I'm working on a web-app where the general architecture is using Jersey for RESTful web-services on the server side and JQuery on the client. Datatables seems like the way to go for a good data table component. On my page I have an array of javascript objects which I have retrieved from a RESTful web service (JSON). I have looked around quite a bit but haven't seen any examples for converting an array of javascript beans into a datatable compatible array, or to otherwise bind my array of objects to the data table. Does anyone have any examples or could you provide suggestions on how to go about this in a clean/re-usable fashion?
Thanks!
G33k
This discussion has been closed.
Replies
In DataTables 1.8 you don't need to do the conversion any more - DataTables has the ability to read from abstract objects for the data to show in the table. This is discussed in this post: http://datatables.net/blog/Extended_data_source_options_with_DataTables - hopefully that will do what you need.
Allan