Apache License 2.0 allows usage also in commercial projects.
private static final FormMapping<Person> personForm = Forms.automatic(Person.class, "person").build();
FormData<Person> formData = new FormData<>( person, ValidationResult.empty); FormMapping<Person> filledForm = personForm.fill(formData); // Push the filled form into a template, // use its properties to render it; or use // FormRenderer to generate form markup // automatically
FormData<Person> formData = personForm.bind( new ServletRequestParams(request)); if (formData.isValid()) { // save the person: formData.getData() } else { // show again the invalid form with validation // messages: personForm.fill(formData) ... }