AI-Powered Form Flow
AI Form Filler lets your users fill the fields of a Vaadin form by typing in natural language or attaching a document. The FormAIController from the AI Integration module connects a layout to an AIOrchestrator so the LLM can read the current values, look up options for combo boxes and selects, and write new values back. Each write is validated through the Binder or the component’s built-in validators, and rejections are reported back so the model can correct them on the same turn.
Source code
Java
TextField name = new TextField("Name");
EmailField email = new EmailField("Email");
ComboBox<String> country = new ComboBox<>("Country");
country.setItems("Finland", "Germany", "United States");
DatePicker hiredOn = new DatePicker("Hired on");
FormLayout form = new FormLayout(name, email, country, hiredOn);
MessageInput messageInput = new MessageInput();
FormAIController controller = new FormAIController(form);
AIOrchestrator.builder(provider, systemPrompt)
.withInput(messageInput)
.withController(controller)
.build();
add(messageInput, form);Example prompts:
-
"Fill in John Doe, john@acme.com, started in Germany on 2026-03-01."
-
"Use the information in the attached resume to fill the form."
-
"Clear the country and date fields."
For the full guide — including field descriptions, options for selects and multi-selects, Binder integration, and field locking during a fill — see AI-Powered Form in the AI Integration section. The same approach is available for tabular data via AI-Powered Grid and for charts via AI-Powered Chart.