Vaadin+Spring+Guava subscribe in view/presenter not working

I have a project using Vaadin+Spring (official) with the MVP pattern. For lose coupling I wanted to use Guava which is working quite well. But I have a few problems. Events are not received in views (annoted with SpringView) or to be more precise in their presenter until I navigate to the view. I assume that the views aren’t created. That’s why listening to the event bus is not possible. How can I listen to events in my views and presenters?

@Subscribe
public void testMe(ExampleEvent event) {
System.out.println("Event received");
}

Hi,

This sounds like the beans are not initialised until you actually go to the view. This might be a scope problem, but without a good example I can’t really tell any more specifics. Can you try to make a minimal example code where this issue can be seen, so we can debug it with ease?

//Teemu

Hi, i have solved this issue. It was a spring scope problem. Thx!