Send filter criteria back to servlet?
Send filter criteria back to servlet?
We're having a fairly massive problem figuring out how to send the filter query back to the servlet so we can make a very large csv file from our datasource. We're in 1.10.. When we just tried to make a request to the servlet in tabletools, we would be sending table structure and data back to the servlet, which of course, errors out; we just want to send whatever was being filtered in the search/filter box along with a simple query string:
\servlet?action=csv
for example. Whenever we tried using any of the embedded buttons, we sent client side structure, etc...
Thanks! We're sooooo close!
This question has an accepted answers - jump to answer
Answers
Wow. Ok, that was scary/tough... So, we're using ajax.params() - very, very nice. I mean really, that's a beautiful thing right now!!!!!
Is there a way I connect a button in TableTools to this information, and toss it the url in the process? Or do I need to put another button in the mix?
I think you might want to look at the many examples starting on this page:
https://datatables.net/extensions/tabletools/examples
You should get an idea as to how to add a button there and send via ajax whatever parameters you like to the server side.
Hi Alan, thanks, I did, they need to be brought up to 1.10... I'm putting together a brute force method to use the current filter to send the request with, but it's fairly hacky..