Hi
I have a Pojo Class and want to bind it to a table. The class has 3 values: id, amount, incomeExpenses. The class is used to calculate the income and expenses for a company.
pojo.amount
holds the sum of money
pojo.incomeExpense
is used to find out wether the money is income or expense.
The table should have 3 colums: id, income, expenses
So far i used a indexedContainer and filled it manually like this:
// first find out wether it is income or expense
if (pojo.getIncomeExpense().equals(0)) {
container.addItem(new Object[] {
pojo.getId(), pojo.getAmount(), 0.0
});
sumIncome += pojo.getAmount();
} else {
container.addItem(new Object[] {
pojo.getId(), 0.0,pojo.getAmount()
});
sumExpenses += pojo.getAmount();
}
Is there a way to bind my pojo to the table and just add the 2 extra colums?
Cheers Rolfe