Directory

← Back

FlowCDI

CDI integration for Vaadin Flow

Author

Contributors

Rating

@Deprecated

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.

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

  • 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
Released
2018-05-05
Maturity
EXPERIMENTAL
License
Apache License 2.0

Compatibility

Framework
Vaadin 10+
Browser
Browser Independent

FlowCDI - Vaadin Add-on Directory

CDI integration for Vaadin Flow FlowCDI - Vaadin Add-on Directory
# @Deprecated Please use the [official CDI addon](https://vaadin.com/directory/component/vaadin-cdi). 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.
Online