Update components dinamically

Hello Everyone,

I need help, I want to “refresh” a Window that contains a CustomComponent with panels. I want to show in this window how their panels are changing, Im using Thread.sleep to stop the time, then remove the panels and put another one, but it doesnt work… any help plz? Thanks.

I’m not quite sure what you are trying to do. The use of Thread.sleep() sound suspicious. Please note that the Vaadin development model is event-driven and you can’t show the user something, then sleep, and then show something else. The UI is refreshed only after handling the server request and any sleeping just delays that. If you want timed changes in the UI, you need to use polling, such as with the Refresher add-on, or server-side push (several add-ons).

Resolve it with executeJavascript.(“script JS to refresh”);

Thanks! It’s Work. Excellent.