refresh order

Hi,
please help me with refreshing Label element.
My algorithm is:

  1. grid.getContainerDataSource().removeAllItems();
  2. label.setValue("getting data from " + ipAddress.getValue() + “…”);
  3. data = snmpWalk.getFDB(ipAddress.getValue(),community); //long run operation 3-10 seconds
  4. grid.setContainerDataSource(new BeanItemContainer<>(FDBentry.class, data));
  5. label.setValue("table from " + ipAddress.getValue());

But when program is runing and refresh Button is pressed I don’t see what label is chaged to “getting data…”
I see small blue progress bar on top of the screen, then result.

Hello,

It will never work the way you do it. Vaadin is running your code until the end before refreshing screen. So you always wait 3 to 10 seconds then see final result in your label.
You should use some callbacks.

Some leads :

HTH
Sébastien