I was looking how to customize the logic/ behavior of Vaadin’s default loading indicator (which is a progress bar), however, the component is the last instance in a call chain. The task seems too big at the moment and resembles an open-hearted operation. I will try a different approach.
Is it possible to access all tasks triggered in the client (such as executing a DB query, manual execution of scheduled tasks etc), is there a central service/task watchdog?
Unfortunately, there is no way to control default UI progress bar, it is a deep Vaadin implementation detail.
Moreover, if you cancel the client side request (for instance, just close browser tab) the request on the server side will not be canceled until finished. That’s why we recommend that you use BackgroundTasks mechanism if you start long-running tasks, they are processed in background threads that can be canceled from UI.
I have a table with custom columns - the information is fetched through Background Tasks (one for each cell).
I kept reference to the returned handler of BackgroundTaskHandler.handle(BackgroundTask) and executed the cancel() method of the handler but the BackgroundTask canceled() method, which I overridden, does not get called.
Could you please provide a short code sample of how you can cancel background tasks in such a case?
PS: Let’s say, when I press a button in the UI, all the ongoing background tasks must be canceled.
PSS: We use the latest version of CUBA6.