Table won't update calculated column

I have a table that is being backed by a JPAContainer. The fields in the editable columns all have value change listeners attached to them, so when the user changes one of those values, a calculation is being carried out right away. This calculation calculates the delta between the new value and the old value, and stores it in the delta field which is the last column in the table. This column is just another database column, i.e. it is not a generated column, but the value should be stored in the database. Problem is that after the calculation, the new value is not shown, only when switching tab pages and returning the value is displayed correctly.

The value is set by a table.getItemProperty("property").setValue(value) statement. The value can be shown by a table.refreshRowCache() statement, but this also fires the valuechangelisteners for the editable fields. So doing a refreshRowCache() from the value change listeners creates an endless loop.

I know there are many other threads about this topic, but I think this case is different because:

  1. The calculation is done in the same thread. From reading the other forum posts about this topic I learned that in this case the table should show the updated value
  2. It is not a generated column. For generated columns this is a common problem
  3. I’ve got another table in the same screen which is also updated from the same calculation. This table shows the updated values immediately.

​I hope someone on the forum has a solution for this issue, since it is going to be a show-stopper for my project if it can’t be solved.

Vaadin version = 7.2.4; Java SE 7 (1.7.0_60); GlassFish4; MySql