if (childReport.hasChilds() == true) {
item.add(createReportLink("actionLink", reportStorage, childReport.getId()));
item.add(new Label("childId", "[invisible]").setVisible(false));
} else {
item.add(new Label("actionLink", "[invisible]").setVisible(false));
item.add(new PlainLabel("childId", childReport.getId()));
}
item.add(new SubmitLink("showAccountingRecordsLink") {
@Override
public void onSubmit()
{
setResponsePage(new AccountingRecordListPage(AccountingRecordListPage.getPageParameters(childReport.getId())));
}
});
}
}
rowRepeater.removeAll();
int row = 0;
final BusinessAssessmentTable businessAssessmentTable = currentReport.getChildBusinessAssessmentTable(true);
final BusinessAssessment firstBusinessAssessment = businessAssessmentTable.getBusinessAssessmentList().get(0).getValue();
for (final BusinessAssessmentRow firstBusinessAssessmentRow : firstBusinessAssessment.getRows()) { // First BusinessAssessment for
// getting meta data of
// BusinessAssessment.
if (priority.ordinal() > firstBusinessAssessmentRow.getPriority().ordinal()) {
// Don't show all business assessment rows (priority is here a kind of verbose level).
continue;
}
final WebMarkupContainer rowContainer = new WebMarkupContainer(rowRepeater.newChildId());
rowRepeater.add(rowContainer);
rowContainer.add(AttributeModifier.replace("class", (row++ % 2 == 0) ? "even" : "odd"));
rowContainer.add(new Label("zeileNo", firstBusinessAssessmentRow.getNo()));
StringBuffer buf = new StringBuffer();
for (int i = 0; i < firstBusinessAssessmentRow.getIndent(); i++) {
buf.append(" ");
}
buf.append(HtmlHelper.escapeXml(firstBusinessAssessmentRow.getTitle()));
rowContainer.add(new Label("description", buf.toString()).setEscapeModelStrings(false));
final RepeatingView cellRepeater = new RepeatingView("cellRepeater");
rowContainer.add(cellRepeater);
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()
{