throws SAXException, WingException, SQLException,
SolrServerException, IOException, ParseException {
String title = display.getTitle();
Dataset dataset = display.getDataset();
if (dataset == null) {
/** activate dataset query */
dataset = display.getDataset(context);
}
if (dataset != null) {
String[][] matrix = dataset.getMatrix();
// String[] rLabels = dataset.getRowLabels().toArray(new String[0]);
Table table = mainDiv.addTable("list-table", matrix.length, 2,
title == null ? "detailtable" : "tableWithTitle detailtable");
if (title != null)
{
table.setHead(message(title));
}
Row headerRow = table.addRow();
headerRow.addCell("", Cell.ROLE_HEADER, "labelcell");
headerRow.addCell("", Cell.ROLE_HEADER, "labelcell").addContent(message(T_head_visits_views));
/** Generate Table Body */
for (int col = 0; col < matrix[0].length; col++) {
Row valListRow = table.addRow();
Cell catCell = valListRow.addCell(col + "1", Cell.ROLE_DATA,
"labelcell");
catCell.addContent(dataset.getColLabels().get(col));
Cell valCell = valListRow.addCell(col + "2", Cell.ROLE_DATA,
"datacell");
valCell.addContent(matrix[0][col]);