Especialista en Ing. Software Desarrollador BackEnd en S4N Certificado en Vaadin 14 Professional Certificado en Vaadin 14 Developer Blog: http://geovanny0401.blogspot.com/
new TextField("Nombre"); EmailField email = new EmailField("Email"); public FormView(Service service) { Person model = service.getPerson(); Binder<Person> binder = new BeanValidationBinder<>(Person.class); // Binds view fields to the model based on name binder.bindInstanceFields(this); binder.readBean(model); Button saveButton = new Button("Guardar", e -> { if (binder.writeBeanIfValid(model)) { service.savePerson(model); } }); add(firstName, email, saveButton); } } FormView.java form.component.ts
nombre = new TextField("Nombre"); EmailField email = new EmailField("Email"); public FormView(Service service) { Person model = service.getPerson(); Binder<Person> binder = new BeanValidationBinder<>(Person.class); // Binds view fields to the model based on name binder.bindInstanceFields(this); binder.readBean(model); Button saveButton = new Button("Save", e -> { if (binder.writeBeanIfValid(model)) { service.savePerson(model); } }); add(firstName, email, saveButton); } } FormView.java Fuente: https://vaadin.com/comparison