Using Refresher


I’m using refresher to update a page with messages coming from an ActiveMQ.
I’ve made a view and my init method is like this:

   public void initialize ()
      final Refresher refresher = new Refresher();
      refresher.addListener(new TextRefreshListener());
      //conversation is a label where I want to display the texts coming from the ActiveMQ


Of course I have implemented the TextRefreshListener class.
The problem is that calling
makes the components disappear from the view (they are not added) and I’ve never got the refresher working.

I was basing my code on the Chat application example ( but now the Refresher is not a component anymore. I’ve had a look at the example in the add-on page but I don’t want to create threads… I just want to call a certain bunch of code every x seconds.

What am I missing to make the refresher work and why aren’t my components displayed?

Thank you!

Ok, I found the problem. I didn’t know about the custom widgetset. I had to add it to web.xml like this: