Skip to content

kumm/cdiutils

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

CDI Utils is an add-on for Vaadin framework aiming at simplifying
application development with Vaadin and CDI. Here are the utilities it provides:

1. @VaadinScope
Custom CDI scope designed especially for vaadin applications. 


2. Lightweight MVP framework
2.1.Extend View interface for your view
2.2.Create view instance that extends AbstractView and implements your View extension
2.3.Extend AbstractPresenter and annotate it with @ViewInterface(YourViewInterface.class)
That's it.
-The correct view instance is then automatically injected to your presenter (Your view control logic can then reside in the presenter)
-The view should use CDI's built-in event bus to fire events that are observed by the presenter. The add-on provides a utility for this: fireViewEvent(ParameterDTO). The ParameterDTO can be used to transfer any data to the presenter (CDI Event observers only accept one parameter)
-Call yourViewImplementationInstance.openView() each time the view is accessed (this will eventually invoke yourPresenterInstance.viewOpened())


3. Producers for declaratively defined Vaadin components (@Preconfigured -annotation)
Inject preconfigured Vaadin Components to your views. For example:

@Preconfigured(captionKey="btnUpdate", styleName=Button.STYLE_LINK, enabled=false)
private Button button;

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%