I am using Vaadin Spring 1.0.0 and trying to figure out how could I inject beans that are available only within UI scope (when the user has the page opened) into classic spring @Component
beans. Simple, let's have classes:
@Component
public class A {
@Inject
private IB b;
}
@UIScope
@SpringComponent
public class B implements IB {
}
And obviously during startup:
Caused by: java.lang.IllegalStateException: No VaadinSession bound to current thread
What is the normal way how to do it? I understand the whole concept, that beans are initialized on startup when UI scope is not available, but I use common libraries which are implemented in Spring with @Component
and I want to implement some of the interfaces, but I can do it only in UI scope and not during startup.