问题是我想动态更改导出文件名。 为此,我重写了fnClick函数,如下所示:
{
"sExtends": "pdf",
"bSelectedOnly": true,
"mColumns": [1,2,3,4,5,6,7,8],
"sPdfOrientation": "landscape",
"sTitle": 'Liste classes'
+ new Date().asString("ddmmyyyy à hhhmin"),
"fnComplete": function ( nButton, oConfig, oFlash, sFlash ) {
deselectVisibleNodes();
},
"fnClick": function( nButton, oConfig, flash ) {
var title = getExportFileName();
var exportFileName = title + ".pdf";
flash.setFileName( getExportFileName()+".pdf" );
console.log(this.fnGetTitle(oConfig));
this.fnSetText( flash,
"title:"+ title +"\n"+
"message:"+ oConfig.sPdfMessage +"\n"+
"colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+
"orientation:"+ oConfig.sPdfOrientation +"\n"+
"size:"+ oConfig.sPdfSize +"\n"+
"--/TableToolsOpts--\n" +
this.fnGetTableData(oConfig)
);
}
}
我添加了控制台日志以显示包含我的数据的this.fnGetTableData(oConfig)的结果。 阻止问题是不显示导出文件窗口(用于保存文件)。 发生什么事了?