RowIterator rowIterator = this.tableModel.getRowIterator();
// iterator on rows
while (rowIterator.hasNext())
{
Row row = rowIterator.next();
if (log.isDebugEnabled())
{
log.debug("[" + getId() + "] rowIterator.next()=" + row);
}
if (this.tableModel.getTableDecorator() != null)
{
String stringStartRow = this.tableModel.getTableDecorator().startRow();
if (stringStartRow != null)
{
buffer.append(stringStartRow);
}
}
// open tr
buffer.append(row.getOpenTag());
// iterator on columns
if (log.isDebugEnabled())
{
log.debug("[" + getId() + "] creating ColumnIterator on " + this.tableModel.getHeaderCellList());
}
ColumnIterator columnIterator = row.getColumnIterator(this.tableModel.getHeaderCellList());
while (columnIterator.hasNext())
{
Column column = columnIterator.nextColumn();
// Get the value to be displayed for the column
buffer.append(column.getOpenTag());
Object value = column.getChoppedAndLinkedValue();
// check if column is grouped
if (column.getGroup() != -1)
{
value = this.groupColumns(value.toString(), column.getGroup());
}
// add column value
buffer.append(value);
buffer.append(column.getCloseTag());
}
// no columns?
if (this.tableModel.isEmpty())
{
if (log.isDebugEnabled())
{
log.debug("[" + getId() + "] table has no columns");
}
buffer.append(TagConstants.TAG_TD_OPEN).append(row.getObject().toString()).append(
TagConstants.TAG_TD_CLOSE);
}
// close tr
buffer.append(row.getCloseTag());
if (this.tableModel.getTableDecorator() != null)
{
String endRow = this.tableModel.getTableDecorator().finishRow();
if (endRow != null)