I have a Struts 2 application that was using DataTables 1.9. I am now trying to convert it over to DataTables 1.10 which changed the way it sends the HTTP Parameters to the server. I am now trying to deal with a HTTP Parameter that looks like this:
columns[1][data]
I have a List in my struts action called "columns" which contains an object with a "data" property. Nothing gets pushing into the columns list when the action fires. I know that normally I would send a parameter like this using:
columns[1].data
I dug into the DataTables code and found out that it is using the jQuery.param
to serialize the JS object created by DataTables. I have tried to set the "traditional" parameter on the ajax request to true
, but then I get [object+Object]
for the parameter value.
Can someone please tell me if there is a way to do one of the following:
- Get Struts2 to deal with this parameter notation
- Change the way jQuery serializes these parameter names
There is an option in DataTables to revert back to the old parameters it sent, but it seems like this may not be around forever and I would prefer to get it working with the new parameter structure.