Hey,
This is what I am trying to accomplish:
public DataTable generateDataTable() {
DataTable data = new DataTable();
data.addColumn(new ColumnDescription("Metric", ValueType.TEXT, "Metric"));
data.addColumn(new ColumnDescription("Statistic", ValueType.NUMBER, "Statistic"));
TableRow row = new TableRow();
row.addCell("Pizza");
row.addCell(20.0);
try {
data.addRow(row);
} catch (TypeMismatchException e) {
e.printStackTrace();
}
return data;
}
}
The line with 'data.addRow(row)' gives an internal server error, but I have no idea why.
My goal is to use the DataTable without the use of an extra google-servlet (the examples use:
SimpleExampleServlet extends DataSourceServlet).
How can I create a datatable, that will be saved in a request?
Thanks in advance