Good morning
I would like to integrate the Pivot table with my J2EE/XHTML application. I have tried to use the following setup (as described in the documentation) with this JSP code in a XHTML page:
function updateDHXAdminPivot() {
var dhxFields=document.getElementById("#{parentForm}:adminTab:dhxFields").value;
var dhxDatafile = document.getElementById("#{parentForm}:adminTab:dhxDatafile").value;
alert(dhxFields);
alert(dhxDatafile);
var pivot = new dhx.Pivot("pivot", {
fields: {
rows: ["USERNAME"],
columns: ["MODULE"],
values: [{ id: "USERNAME", method: "count" }],
},
fieldList: JSON.parse(dhxFields),
});
alert("/rest/dhxdatafile/name/"+dhxDatafile);
pivot.load("../../rest/dhxdatafile/name/"+dhxDatafile, new dhx.dataDrivers.csv({
nameByHeader: true,
rowDelimiter: "\n",
columnDelimiter: ","
}));
I am keeping getting an error like:
Failed to load resource: the server responded with a status of 406 (Not Acceptable)
The problem is that the url is working perfectly and allows my to download correctly a CSV file.
Is there an example I can use to better understand why the code is bugging?
Thank you for the help and best regards