oTableTools not working in jstl for dynamic data
oTableTools not working in jstl for dynamic data
aratkumarrana
Posts: 2Questions: 0Answers: 0
[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?
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?
This discussion has been closed.
Replies