3

This is a followup to this question: Are there any web frameworks for JVM with data binding checked at compilation time?

In that question, the accepted answer was JSP.

My question is, do any of the modern frameworks, like Wicket, Play 2.0, Spring MVC, Vaadin, Grails, Tapestry, JSF, GWT, etc support this feature of compile-time binding?

I understand newer developers prefer dynamic binding without any compile-time checks, so the feature has been eliminated from most modern languages and frameworks. I just want to know if any of them have retained support of this specific old feature, even if it's supported as an option.

Community
  • 1
  • 1
Alex R
  • 11,364
  • 15
  • 100
  • 180

1 Answers1

1

As I know, Vaadin 8 supports this kind of binding with Java lambda expressions.

Binder<Person> binder = new Binder<>();

TextField titleField = new TextField();

// Start by defining the Field instance to use
binder.forField(titleField)
  // Finalize by doing the actual binding to the Person class
  .bind(
    // Callback that loads the title from a person instance
    Person::getTitle,
    // Callback that saves the title in a person instance
    Person::setTitle));

See docs for details: https://vaadin.com/docs/framework/datamodel/datamodel-forms.html

jreznot
  • 2,694
  • 2
  • 35
  • 53