Refresher Component

I added the refresher component to my project with no problems. In functionality it looks like javascript setInterval(). What I was hoping was that it internally called some low level refresh command on the Vaadin server side so it would update the controls of the current page automatically at the designated interval. What I quickly realized though was that unless you are raising some server side event (like a button click for example) within the refresh(Refresher source) method you don’t get any update of the control/screen values even if you have updated them previously and they are “dirty”.

I found a quick workaround to this like.

public void refresh(Refresher source) {;

And then I could do whatever in my button click event and that would fire a server side update.

Ugly but works…

What I was hoping to see somewhere was something a lot cleaner like this…

public void refresh(Refresher source) {

Or something to that effect. Looking at allllll of the many posts I see everything from connecting to an empty datasource, to standing on one leg facing west to do what I did to get the screen to refresh.

So my question is a simple one.

public void refresh(Refresher source) {
??? What can I put here to “just” force the window/panel/selected controls to refresh ??? (lets not use button click or something like that, its just ugly.) ???

Based on all the posts I have read it seems there was never any architectural considerations regarding how to push something downstream, say if you got a message from your messaging layer and wanted to push it to the clients unattended… I get the why reading the posts and I have no problem with this Refresher/Timer Control firing at intervals and calling its listener function. But it would be really nice if I could call something like Window.forceRefresh() instead of hijacking some innocent control’s event and forcing it into a sad life of constant refresh spoofing… lol

If I missed something in my 2 hours of reading I sincerely apologize for the question… Please enlighten… I am really new to Vaadin so still slogging though the mud… lol

Any plans for something like this in V7?



That’s strange; the purpose of refresher is to initiate a call to the server, which should automatically update the UI state to the browser. An empty listener method should be enough for this.

How do you update your ui state in the background?