-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, I have listbox with 3 columns A,B and sum. I am getting a and values from database. What i need is to sum them up in each row. I tried to do it like this but it doesnt work...:
<listitem>
<listcell label="@load(each.a)"/>
<listcell label="@load(each.b)"/>
<listcell>
<zscript>
int sum = ${each.nrOfPieces}+$(each.vyrobok.pocetKz);
</zscript>
<label value="${sum}" />
</listcell>
</listitem>
but it doesnt work... thx for any advices
EL expressions can be very powerful. Have a look here.
The following snippet should do the trick:
<listitem>
<listcell label="@load(bean.amount)" />
<listcell label="@load(bean.tax)" />
<listcell label="@load(bean.amount + bean.tax)" />
</listitem>
Hope that helps, Costas
i don't learned still that, but if it help, you can put a calculated field on java (there are calculated fields for JPA) i did an example here: Example-for-calculate-field
Asked: 2014-05-23 06:32:29 +0800
Seen: 17 times
Last updated: May 24 '14