I have a commercial application that has an extremely time consuming login for the user. The connection to the Database to validate user and password, as well as the initialization of Spring Security take around 0.8 seconds, which is great.
The problem is the loading of the main page, which displays graphs and tables and the connection to the Bank reaches more than 20 seconds. The query is made at the Bean startup and only after the return, the displayed page changes. For the user, there is no feedback while this is done and gets the impression that the application has crashed.
Calling the Home Page method:
<f:metadata>
<f:viewAction action="#{paginaInicialBean.inicializar()}"/>
</f:metadata>
I have already tested with @PostConstruct
, javascript methods like window.onload
or with the word " defer ", but all have the same behavior already offered by the core schema of JSF (f :).
I thought about doing a step load as Gmail does, but I was not successful in the implementation. Another option would be to display my template (Top Menu) and only then call the Home Page method, so the user knows that something is being loaded and if you do not want to wait, you can exit by browsing the menu.
Has anyone had this difficulty yet?