if (this.listObject.getDisplay().isDownloadIcon()) {
buffer.append("<td class=\"listHeader\">");
buffer.append(ValueListConstants.COLUMN_HEAD_CLOSE);
}
for (int i = 0; i < columnsLength; i++) {
FieldDescriptor field = (FieldDescriptor) columns.get(i);
String key = field.getExternalResourceKey();
String columnName = null;
if (key.length() > 0) {
columnName = messages.getMessage(locale, field.getExternalResourceKey());
} else {
columnName = field.getFieldName();
}
this.openTagCSS(buffer, "TD", "listHeader");
// build the sort link
if (this.listObject.getDisplay().isSortable()) {
this.addSortLink(buffer, field, columnName);
} else {
buffer.append(columnName);
}
buffer.append(ValueListConstants.COLUMN_HEAD_CLOSE);
this.selectedColumns.add(new Integer(field.getQueryIndex()));
buffer.append("\n");
}
buffer.append(ValueListConstants.ROW_CLOSE);
buffer.append(ValueListConstants.HEAD_CLOSE);
}