CDI integration for Vaadin Flow
Please use the official CDI addon. It's API is almost the same, mainly just the package name differs.
In a nutshell your route target, and layout components become CDI contextual instances. You can use any CDI feature, for example @Inject.
- @VaadinServiceSession - a scope for services with VaadinsServletService lifecylce like Instantiator, or I18NProvider.
- @VaadinSessionScoped - a scope of a VaadinSession
- @UIScoped - a scope of a UI. A pseudo scope, use it for components.
- @NormalUIscoped - a scope of a UI. It is a normal scope, usable for other beans.
- @RouteScoped - together with @RouteScopeOwner it can be used to bind beans to router components (@Route/ParentLayout/HasErrorParameter)
- @NormalRouteScoped - distinction same as at UI scopes
Non-component events fired as CDI event:
See project readme for details.
- All non-component events published as CDI event
- upgrade to vaadin 10.0.0.beta9
- deploy time checks for @RouteScopedOwner
- SystemMessages and ErrorHandler CDI beans are automatically picked up