Skip to content

Instantly share code, notes, and snippets.

@gautier-levert
gautier-levert / PlayDynamicCustomForms.md
Created July 20, 2017 12:15 — forked from kjorg50/PlayDynamicCustomForms.md
Java Play Framework - Dynamic, Custom Forms

Play Framework Dynamic Forms

This post is intended to summarize my efforts in creating a dynamic form with custom data objects in the Java Play Framework. The version I am working with is 2.3.7. This example proved to be very useful

Motivation

I have a CSVData class in my app, and I want to create instances of this class via form input. Here are the basic attributes of this class, with annotations removed for brevity:

public class CSVData extends VirtualSensor implements CSVWrappable {

 // used by play to save it in the DB