How to detect shared state is transfered to client

Hello,

Im writing widget which displays some data from server. When widget is created, it is initialized with loads of rows from database. Later it should receive updates of only one to few rows at the time.

My problem is how to know when initial load has been transfered to client, so I can clear shared state from list of rows which already are at client?

Looking at Vaadin components, to me it looks like all attributes of shared state is always transfered to client. I guess this does not raise any problem with smaller widgets/components, but I cannot convince myself to transfer initial rows to client everytime one row is added.

Perhaps Im approaching this problem wrong way? What would be Vaadin way of doing this stuff?

There’s
an enhancement ticket
about the feature you want: sending only diffs of changed collections in the shared state. Unfortunately, it’s not yet implemented. The best workaround is to use the RPC mechanism instead, so instead of having a Collection in your state class, you’d have addRows, removeRows etc. RPC methods.