-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Step 9 | 09:00 | Define data binder for the form
- Loading branch information
Showing
1 changed file
with
9 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
package org.vaadin.stepbystep; | ||
|
||
import com.vaadin.data.Binder; | ||
import org.vaadin.stepbystep.person.backend.Person; | ||
|
||
/** | ||
* Created by amahdy on 6/1/17. | ||
*/ | ||
public class PersonEditorView extends PersonEditorDesign { | ||
|
||
Binder<Person> binder = new Binder<>(Person.class); | ||
|
||
public PersonEditorView() { | ||
binder.bindInstanceFields(this); | ||
} | ||
|
||
public void setPerson(Person value) { | ||
binder.setBean(value); | ||
} | ||
} |