Improve MVVM support


  1. Add method refreshDataBinding() on BeanItem
    When we need change values in UI components we should do it with databinding.
    Ideally we can change value in POJO VO and changed value popup in UI.
    This is not working - now we must set values on Properties - this is very ugly.
    Better is changing values in POJO VO and in the end call refreshDataBinding().

2. Add method setBean() on BeanItem

Sometime we need change whole VO.

3. Allow databinding on buffered Components.

Buffered TextField do not listen to datasource change value events.

Please create a ticket at
instead. Just leaving it here almost guarantees that nothing is going to happen.

If I recall correctly, I think Artur argued in another forum post recently that 3 is intentional.

For the setBean(), I did a prototype/test of this a long time ago, the code from that time is in
this thread
. This is related also to the old enhancement request
. Implementing this correctly turned out quite a bit more complicated than just adding a setBean() method, but was doable. The refresh requires effectively the same changes as setBean() and then a little more.

Note that the test is just for a standalone BeanItem, using one in a Bean(Item)Container would require some changes on that side as well.