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.

Additional contexts:

  • @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:

  • ServiceInitEvent
  • PollEvent
  • BeforeEnterEvent
  • BeforeLeaveEvent
  • AfterNavigationEvent
  • UIInitEvent
  • SessionInitEvent
  • SessionDestroyEvent
  • ServiceDestroyEvent

See project readme for details.


Link to this version
ExperimentalReleased 05 May 2018Apache License 2.0
Framework Support
Vaadin platform 10+
Browser Independent
Install with
Release notes - Version 1.0.alpha3
  • 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