Long initialization of application

Hello, I have some problem with building my vaadin application.
It has long difficult logic of building in init method like this:

	Accordion accordion = new Accordion();
	Tab cardTab = null;
        cardTab = getCardTab(CardMode.ReadWrite);

Function getCardTab is very long.

This vaadin application is invoked by JSP. (For some reasons)
And while it is trying building the user is looking at the previos jsp page.
I want that user looks at vaadin round progress bar.

Can somebody help me?

I don’t have experience in Vaadin applications embedded in HTML, so I can’t give you a Vaadin-specific answer. But here’s something that I thought about:

You could try having a temporary page, that you switch with JavaScript. So, have your page initially load into a page that simply shows a spinning loading gif file. Then with JavaScript, for example jQuery, you put an event in the document onLoad (with jQuery: $(document).
(function () {…}); ) that swaps the content into the HTML that embeds your Vaadin application inside the JSP page.

Another possibility would be to simply defer the loading of your “getTabCard()”-method to only after the Vaadin application has initialized the first time. You could try this by adding a delay with e.g.
(add refrehser to your application. Wait for the first refresh event, and then remove it, as you swap the contents into the tabCard things), or something similar.

Thank you, I will try a variant with Refresher.

LazyLoadWrapper add-on
might also be useful in your case.

Wow! Thank you that is exactly that I need!