oTableTools not working in jstl for dynamic data

oTableTools not working in jstl for dynamic data

aratkumarranaaratkumarrana Posts: 2Questions: 0Answers: 0
edited January 2014 in TableTools
[quote]
Hi,
I am using spring and jstl in my project.

I am trying to use otabletools to download the table data in pdf format but, it is not working.

based on the dropdown selection I am populating username field, status once the user enter the user name and click on view report button, I am calling ajax and populating the data in div. Initially the div is in hidden mode once I got the ajax response I am making the div as visible. but it is not working.

If I remove style="display:none" from the div then I am able to download the report as pdf file.
[/quote]
Below is my code.
[code]




retailerRptTable = $("#retailerTable")
.dataTable(
{
"sDom" : 'T<"clear">lfrtip',
"oTableTools" : {
"sSwfPath" : "",
"aButtons" : [

{

"sExtends" : "pdf",

"sTitle" : "Users By Retailer",

"sButtonText" : "Download Pdf ",

"sButtonClass" : "btn btn-primary"

}

]
},
"oLanguage" : {
"sZeroRecords" : "No Users Found"
},
"aoColumnDefs" : [ {
"mData" : "retailerId",
"sWidth" : "20%",
"aTargets" : [ 0 ]
}, {
"mData" : "retailerStatus",
"sWidth" : "20%",
"aTargets" : [ 1 ]
}, {
"mData" : "legalName",
"sWidth" : "20%",
"aTargets" : [ 2 ]
}, {
"mData" : "locAddress",
"sWidth" : "20%",
"aTargets" : [ 3 ]
}, {
"mData" : "emailAddr",
"sWidth" : "20%",
"aTargets" : [ 4 ]
} ]
});






Retailer Id
Retailer Status
Legal Name
Location Address
Email Address








[/code]
Could you help me on this?

Replies

  • aratkumarranaaratkumarrana Posts: 2Questions: 0Answers: 0
    I got the solution. Instead of using style="display:none" use style="visibility:hidden" and while displaying the div use $("#divid").css({"visibility":"visible"});
This discussion has been closed.