What's wrong with the EventListener documentation example?

If I use EventListener like onOrderLineChangedBeforeCommit from documentation, edited Order updates on table component of browser screen only when OrderLine created or deleted but not updated.
If OrderLine was updated I need to click Refresh button from filter to see new Order amount value.
What is wrong ?

I don’t see anything wrong with this part of the docs.

If you need to update UI in response to arbitrary data changes, send application events using UiEventPublisher in your EntityChangedEvent listeners and handle them in screens to reload data.

UI components are updated automatically only in response to changes in entity instances that they are bound to. In EntityChangedEvent listeners, you work with different instances.

So it is normal that amount column of table component with list of Orders updates only on addition and deletion of OrderLines in order.edit screen ? Really ?

orederAmount.zip (332.2 KB)
Sample project

Absolutely. The Order instance updated by the your listener and instance shown by the table are different instances in memory.

The fact that you see changes in table when add/delete lines and don’t see changes when update a line is just a coincidence - when you add/delete lines, the Order editor decides that it must reload Order and return it to the browser (with the changed state). Add a field to the Order editor and change it somehow together with a line - you will see the changed state in the browser, because it will be reloaded from the database.