Documentation versions (currently viewingVaadin 8)

Vaadin 8 reached End of Life on February 21, 2022. Discover how to make your Vaadin 8 app futureproof →

Component Extensions

Components and UIs can have extensions which are attached to the component dynamically. Especially, many add-ons are extensions.

How a component is extended depends on the extension. Typically, they have an extend() method that takes the component to be extended as the parameter.

TextField tf = new TextField("Hello");

// Add a simple extension
new CapsLockWarning().extend(tf);

// Add an extension that requires some parameters
CSValidator validator = new CSValidator();
validator.setErrorMessage("Must be a number");

Development of custom extensions is described in "Component and UI Extensions".