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.

...so instead of:

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

..you 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.

Install

Link to this version
BetaReleased 26 March 2017Apache License 2.0
Framework Support
Vaadin 8.0+
Also supported:
Vaadin 7 (0.9.3)
Browser Independent
Install with
Release notes - Version 0.10.0

Vaadin 8 support (thanks to https://github.com/klenkes74)