Implementing DRY Forms
- by virtualeyes
Getting into Play 2.0, overall, blown away, great stuff.
Anyway, wondering how one can achieve DRY forms in Play? If you look at the create & edit examples in the Computer Database Sample, you'll see that the form elements are repeated. With just 4 fields (in the sample form), no big deal, but when you're dealing with large, complex forms and/or handling many CRUD models, the duplication becomes a bigger maintenance issue.
On the binding end ( form.bindFromRequest and form.fill(Foo) ), the implementation is so elegant for create/edit operations; is there a corresponding solution in the template layer?