int col = 0;
for (final LabelValueBean<String, BusinessAssessment> lv : businessAssessmentTable.getBusinessAssessmentList()) {
// So display the row for every BusinessAssessment:
final String reportId = lv.getLabel();
final BusinessAssessment businessAssessment = lv.getValue();
final BusinessAssessmentRow businessAssessmentRow = businessAssessment.getRow(firstBusinessAssessmentRow.getId());
final WebMarkupContainer item = new WebMarkupContainer(cellRepeater.newChildId());
cellRepeater.add(item);
buf = new StringBuffer();
buf.append("text-align: right; white-space: nowrap;");
if (col++ == 0) {
buf.append(" font-weight: bold;");
}
final BigDecimal amount = businessAssessmentRow.getAmount();
if (amount != null && amount.compareTo(BigDecimal.ZERO) < 0) {
buf.append(" color: red;");
}
item.add(AttributeModifier.replace("style", buf.toString()));
item.add(new PlainLabel("bwaWert", NumberHelper.isNotZero(businessAssessmentRow.getAmount()) == true ? CurrencyFormatter
.format(businessAssessmentRow.getAmount()) : ""));
item.add(new SubmitLink("showAccountingRecordsLink") {
@Override
public void onSubmit()
{
setResponsePage(new AccountingRecordListPage(
AccountingRecordListPage.getPageParameters(reportId, businessAssessmentRow.getNo())));
}
});
}
}
}