row.appendChild(delete);
}
private void appendValueInLines(Row row) {
final ExpenseSheetLine expenseSheetLine = (ExpenseSheetLine) row.getValue();
final Decimalbox dbValue = new Decimalbox();
dbValue.setScale(2);
Util.bind(dbValue, new Util.Getter<BigDecimal>() {
@Override
public BigDecimal get() {
if (expenseSheetLine != null) {
return expenseSheetLine.getValue();
}
return BigDecimal.ZERO.setScale(2);
}
}, new Util.Setter<BigDecimal>() {
@Override
public void set(BigDecimal value) {
if (expenseSheetLine != null) {
expenseSheetLine.setValue(value);
}
}
});
dbValue.setConstraint(checkConstraintExpenseValue());
dbValue.setFormat(Util.getMoneyFormat());
row.appendChild(dbValue);
}