in my application I use a TabSheet with a few Tabs on it. The forms on this tabs are quite complex, so changing the tabs takes a while (the client browser needs time to process the JSON data).
What I want to to is showing a notification “Please wait while loading data…”. For this I added a SelectedTabChangeListener to my TabSheet and there added a notification to my main window.
The problem is, that my notification is shown only after the new tab is shown (so it’s useless). Is there any option to show the notification immediately after the user clicked on the new tab and so display it while the browser processes the JSON data?
Take a look at the
Toolkit Productivity Tools add-on. In addition to many other features, it has support for something like that.
Note that it has been developed against an older version of Vaadin, but it is pure server-side add-on, and probably almost if not completely compatible with current versions. You can post a message in the add-ons category of the forum or contact its author if there are any problems.
Also you could try
Lazy Load Wrapper . With that you could have more places to tune the rendering and show a spinning wheel while rendering.
Lazy Load Wrapper could also actually resolve the actual issue - if you wrap different sections of the form with the wrapper, you can start rendering and loading them when they are actually scrolled to view (or a bit before that). If you can split the form to 10 parts, it could turn the load time from 5secs to 0.5 secs.
Try out
the demo with a large “heavyness factor” to demonstrate this.