List of usage examples for com.vaadin.data Binder bind
public <FIELDVALUE> Binding<BEAN, FIELDVALUE> bind(HasValue<FIELDVALUE> field,
ValueProvider<BEAN, FIELDVALUE> getter, Setter<BEAN, FIELDVALUE> setter)
From source file:uk.q3c.krail.testapp.view.AccountsView.java
License:Apache License
public void fake() { Binder<Person> binder = new Binder<>(); TextField titleField = new TextField(); // Start by defining the Field instance to use binder.forField(titleField)/*from w ww. j av a2 s . c o m*/ // 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); TextField nameField = new TextField(); // Shorthand for cases without extra configuration binder.bind(nameField, Person::getName, Person::setName); }