Loading current page (almost) every mouse click

Hello,

I’ve noticed every mouse click Vaadin reload the current page. Its frustating because the application takes a lot of time to reload.

I think it is not a service layer problem because I just click the component, for example a ComboBox or a Tree Component.

Any Idea?

thank you!
Flavio

Hello Flavio,

In general, Vaadin does not do actual page reloads in response to user actions. The user interaction and ui changes are communicated between client and server using AJAX. By design most of the user interface logic (click listeners, etc) resides on the server side in Vaadin. When you click a button, XML-http request is sent to server and your click listener is invoked. Depending what you do in the click listener, the structure of the page may change. This change is communicated back to the client (browser). If the content of the ui changes, there may be need to layout things again.

In case the layout phase takes long time, you probably need to optimize your view structure a bit. You can check the time spent in layouting by opening the page in debug mode (add ?debug) to your url and look at the messages in the debug console.

Cheers,
Matti

Hello Matti, I really appreciate your feedback! I’ll try it.

All the best
FS