tmp = createValueLabel(value.newChildId(), headerValueRenderCell.getRawValue(),
headerValueRenderCell.getPivotField());
applyRowColSpan(cell, tmp);
value.add(tmp);
} else {
HeaderRenderCell headerRenderCell = (HeaderRenderCell) cell;
tmp = createTitleLabel(value.newChildId(), headerRenderCell.getPivotField());
applyRowColSpan(cell, tmp);
value.add(tmp);
}
}
// rendering grand total column
RepeatingView grandTotalColumn = new RepeatingView("grandTotalColumn");
for (RenderCell cell : row.getGrandTotalColumn()) {
if (cell instanceof GrandTotalHeaderRenderCell) {
GrandTotalHeaderRenderCell grandTotalHeaderRenderCell = (GrandTotalHeaderRenderCell) cell;
if (grandTotalHeaderRenderCell.getRawValue() != null) {
tmp = new Label(grandTotalColumn.newChildId(), grandTotalHeaderRenderCell.getRawValue()
.toString());
applyRowColSpan(cell, tmp);
grandTotalColumn.add(tmp);
} else {
tmp = new WebMarkupContainer(grandTotalColumn.newChildId());
applyRowColSpan(cell, tmp);
tmp.add(AttributeModifier.append("class", "empty"));
grandTotalColumn.add(tmp);
}
} else {
HeaderRenderCell headerCell = (HeaderRenderCell) cell;
tmp = createTitleLabel(value.newChildId(), headerCell.getPivotField());
applyRowColSpan(cell, tmp);
grandTotalColumn.add(tmp);
}
}
grandTotalColumn.setVisible(row.getGrandTotalColumn().size() > 0);