Catch when UI has finished renderer, with thread or similar

Hi, in my app i have to call method, after that the UI is completely render, because this method works only if component has defined dimensions. Is there something as jQuery OnReady, or call a thread only when the Vaadin UI thread is finished?

Hi, on a client side connector you can implement PostLayoutListener which will by notified via the postLayout() method right after the layout phase has finished.

Do you mean create a widget and implements PostLayoutListener? Could you explain this with an example?

The client side connector class needs to implement the PostLayoutListener interface and then implement what is needed to be done after layout in the postLayout() method.

I haven’t actually tried to use this feature but you can find example in the [FormLayoutConnector]
(https://github.com/vaadin/framework/blob/master/client/src/main/java/com/vaadin/client/ui/formlayout/FormLayoutConnector.java#L297) or [WindowConnector]
(https://github.com/vaadin/framework/blob/master/client/src/main/java/com/vaadin/client/ui/window/WindowConnector.java#L274) classes.