Running a background process without Threads...

HI All,

Upon a button click of my vaadin application, it starts reading data from one big table (millions of records), process them & write to another table. This process takes a while & the grey color screen (with the please wait image) blocks me from doing anything in the UI.

I can see there are 2 options for this.

  1. Hand the process over to a thread.
  2. Override the “v-loading-indicator” style to not to block the UI.

Overriding “v-loading-indicator” would affect all screens & it seems not a good solution. Handing the job over to a thread seems the correct thing to do.
But, before I hand the job over to a thread, I would like to know whether there’s any mechanism in vaadin to NOT apply the default “v-loading-indicator” style to a certain task.

Any help is greatly appreciated. Thanks in advance.


There isn’t. The low-level mechanism that is responsible for the loading indicator when a server request takes a long time does not know anything about what high-level user actions are being performed.

Anyway, the correct approach is to use a background thread, either directly or through a suitable ExecutorService in your server. Make sure you perform locking etc. correctly.

Hi Henri,

Thanks for your reply. I’ll use a Thread then.