April 2018
Intermediate to advanced
202 pages
4h 48m
English
Data binding is typically done through the Binder class. This class allows you to connect the values in one or more fields to Java properties in a domain class. Suppose you have a User class (the domain class) with a password Java String as one of its properties. You can create a TextField and bind its value to the password property as follows:
TextField textField = new TextField(“Email”);Binder binder = new Binder<User>() .forField(textField) .bind(User::getPassword, User::setPassword);
This is a powerful and type-safe way of implementing data binding. Imagine that you, at some point during development, decide to rename the password property in the User class to something like pin. You can use the refactoring tools of your IDE ...
Read now
Unlock full access