Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Bug Report
description: Please report issues related to Easy Form Add-on here.
body:
- type: textarea
id: problem-description
attributes:
label: Describe the bug
description: A clear description of the issue you're experiencing.
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: A clear and concise description of the expected behavior.
validations:
required: false
- type: textarea
id: minimal-reproduction
attributes:
label: Minimal reproducible example
description: If possible, add a concise code snippet that reproduces the issue and describe the steps needed to follow to reproduce it.
validations:
required: false
- type: input
id: addon-version
attributes:
label: Add-on Version
description: The version of the add-on on which you're experiencing the issue.
validations:
required: true
- type: input
id: vaadin-version
attributes:
label: Vaadin Version
description: The complete Vaadin version (X.Y.Z) on which the issue is reproducible.
validations:
required: true
- type: textarea
id: additional-information
attributes:
label: Additional information
description: "Any other context/information about the issue can be added here (browser, OS, etc.)."
validations:
required: false


1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Feature Request
description: Please add feature suggestions related to Easy Form Add-on here.
body:
- type: textarea
id: feature-proposal
attributes:
label: Feature proposal
description: A concise but detailed description of the feature that you would like to see in the add-on.
validations:
required: true
- type: textarea
id: feature-implementation
attributes:
label: Describe solution expectations
description: Do you have an idea/expectations of how it could be implemented? Did you try a possible solution that you want to share?
validations:
required: false
- type: textarea
id: additional-information
attributes:
label: Additional information
description: Add any extra information you think it might be relevant to the request.
validations:
required: false
17 changes: 15 additions & 2 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,25 @@ jobs:
build-vaadin24:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build (Vaadin 24)
run: mvn -B package --file pom.xml
run: mvn -B package --file pom.xml

build-vaadin25:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build (Vaadin 25)
run: mvn -B package --file pom.xml -Pv25
14 changes: 9 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules
target
.vscode
.vaadin
.settings
.project
.classpath
Expand All @@ -10,11 +11,14 @@ package.json
webpack.config.js
/error-screenshots
drivers
tsconfig.json
.idea
types.d.ts
/frontend/generated
/frontend/index.html
.eclipse
/tsconfig.json*
/types.d.ts*
vite.generated.ts
vite.config.ts
/src/main/dev-bundle
/src/main/dev-bundle
/src/main/bundles
/src/main/frontend/generated
/src/main/frontend/index.html
/.claude/settings.local.json
4 changes: 2 additions & 2 deletions .vaadin/copilot/vaadin-copilot.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Vaadin Copilot Integration Runtime Properties
#Tue Jan 06 09:29:34 ART 2026
endpoint=http\://127.0.0.1\:50537/vaadin/copilot-3789fb28-3a13-4614-8e14-1bb9afeea771
#Tue Jul 28 12:03:17 ART 2026
endpoint=http\://127.0.0.1\:56632/vaadin/copilot-e2a26822-4451-492a-b12a-cc2b7dbc2666
ide=eclipse
supportedActions=write,writeBase64,delete,undo,redo,refresh,showInIde,getModulePaths,compileFiles,restartApplication,getVaadinRoutes,getVaadinVersion,getVaadinComponents,getVaadinEntities,getVaadinSecurity,reloadMavenModule,heartbeat
version=1.0.0
60 changes: 52 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/easy-form-addon)
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/app-layout-addon.svg)](https://vaadin.com/directory/component/easy-form-addon)
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/easy-form-add-on)
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/easy-form-add-on.svg)](https://vaadin.com/directory/component/easy-form-add-on)
[![Build Status](https://jenkins.flowingcode.com/job/easy-form-addon/badge/icon)](https://jenkins.flowingcode.com/job/easy-form-addon)
[![Maven Central](https://img.shields.io/maven-central/v/com.flowingcode.vaadin.addons/easy-form-addon)](https://mvnrepository.com/artifact/com.flowingcode.vaadin.addons/easy-form-addon)

# Easy Form Add-on

This is a template project for building new Vaadin 24 add-ons
Vaadin Flow component that automatically generates a fully functional form from a Java POJO definition, using reflection and Bean Validation (JSR-380) annotations. All customization is programmatic through a fluent Java API — the POJO stays clean.

## Features

* List the features of your add-on in here
* Automatic field discovery from POJO properties (getter/setter conventions)
* Type-to-component mapping with sensible Vaadin defaults, overridable globally, per form, or per property
* Automatic data binding and Bean Validation (`@NotNull`, `@Size`, `@Email`, `@Min`, `@Max`, ...)
* Fluent per-field API: labels, placeholders, helper texts, validators, converters, custom components
* Field states: visible, read-only, or hidden
* Configurable save/cancel button bar with support for extra buttons
* Responsive multi-column layout with per-field column spanning

## Online demo

[Online demo here](http://addonsv24.flowingcode.com/easy-form)

## Download release

[Available in Vaadin Directory](https://vaadin.com/directory/component/easy-form-addon)
[Available in Vaadin Directory](https://vaadin.com/directory/component/easy-form-add-on)

### Maven install

Expand Down Expand Up @@ -75,13 +81,51 @@ Then, follow these steps for creating a contribution:

This add-on is distributed under Apache License 2.0. For license terms, see LICENSE.txt.

EASY_FORM_ADDON is written by Flowing Code S.A.
Easy Form Add-on is written by Flowing Code S.A.

# Developer Guide

## Getting started

Add your code samples in this section
```java
// Minimal usage — three lines to a working form
EasyForm<Person> form = new EasyForm<>(Person.class);
form.setSaveAction(person -> personService.save(person));
add(form);
```

Customization is done through a fluent API:

```java
EasyForm<Person> form = new EasyForm<>(Person.class);

// Field order (unlisted fields follow, in declaration order)
form.setFieldOrder("firstName", "lastName", "email", "birthDate");

// Field selection (everything not listed is excluded from the layout and the binding)
form.setVisibleFields("firstName", "lastName", "email", "birthDate");

// Or per field
form.configureField("internalCode").excluded();

// Field-level customization (configureField returns the wrapper, field the component)
form.configureField("email").withLabel("Email Address").asRequired("Email is required");
form.configureField("notes").withComponent(new TextArea()).withColSpan(2);

// Events — enable a save button only while the form is valid and dirty
form.addStatusChangeListener(event ->
form.getSaveButton().setEnabled(!event.hasValidationErrors() && event.getBinder().hasChanges()));

// Layout
form.setResponsiveSteps(new ResponsiveStep("0", 1), new ResponsiveStep("600px", 2));

// Button bar
form.setSaveAction(person -> personService.save(person));
form.setCancelAction(() -> navigateBack());

// Pre-populate for editing
form.setBean(existingPerson);
```

## Special configuration when using Spring

Expand All @@ -91,4 +135,4 @@ To do so, just add ```com.flowingcode``` to the ```vaadin.whitelisted-packages``

```vaadin.whitelisted-packages = com.vaadin,org.vaadin,dev.hilla,com.flowingcode```

More information on Spring whitelisted configuration [here](https://vaadin.com/docs/latest/integrations/spring/configuration/#configure-the-scanning-of-packages).
More information on Spring whitelisted configuration [here](https://vaadin.com/docs/latest/integrations/spring/configuration/#configure-packages-scanning).
Loading
Loading