Jquery数据表操作无效

时间:2013-07-10 20:18:42

标签: jquery struts2 datatables

我有导出excel的自定义操作的数据表,但是这些操作没有触发到struts操作类。

 var oTable = $("#products").dataTable({
       "aaData": newarray,
       "bProcessing": true,
       "bDeferRender": true,
       "bFilter": false,
       "bRetrieve": true,
       "bPaginate": true,
       "bJQueryUI": true,
       "sPaginationType": "two_button",
       "sDom": '<"top"<"actions">lfpi<"clear">><"clear">rt<"bottom">',
       "bSort": true
});

 function createTableActions(){
         $("div.actions").append('<a id="excelExport" class="actionButton" alt="Export to Excel" title="Export to Excel" href="pexport"></a>');
     }

请参阅JSFIDDLE

中的所有代码

在页面中工作的相同链接,但不是来自Jquery对话框。

$("div.actions").append('<a id="excelExport" class="actionButton" alt="Export to Excel" title="Export to Excel" href="pexport"></a>');

1 个答案:

答案 0 :(得分:0)

尝试添加:

"fnDrawCallback": function( oSettings ) {
   createListTableActions();
}