Define Vaadin component properties with annotations

CDI Properties contains individual annotations for each Vaadin core component that allow you to define a set of properties right above the injection point. instead of:

TextField textField = new TextField("Name"); textField.setMaxLength(15); textField.setNullRepresentation(""); textField.setWidth("100%"); can:

@Inject @TextFieldProperties(caption = "Name", maxLength = 15, nullRepresentation = "", width = "100%") private TextField textField;

Use properties "captionKey" and "labelValueKey" to assign text values provided by your own TextBundle bean. Fire a @TextBundleUpdated event to utilize the built-in i18n functionality allowing you to change your applications language run-time.

The add-on can only be used in Vaadin CDI enabled projects.


Link to this version
BetaReleased 06 August 2016Apache License 2.0
Framework Support
Vaadin 7.0+
Also supported:
Vaadin 8 (0.10.0)
Browser Independent
Install with
Release notes - Version 0.9.3
  • New property for the Localizer (descriptionKey)