github vaadin/flow 0.0.9
Beans and lists in template model

latest releases: 23.3.31, 24.3.11, 23.5.1...
pre-release7 years ago

New features

  • Support for beans in template model
    public interface FormModel extends TemplateModel {
        public void setPerson(Person person);
        public Person getPerson();
    }
  • Getter for a bean returns a proxy object which is connected to the model (setters update the model values)
  • Setter for a bean copies the bean values into the model
  • Low level model API for handling beans in the model:
void TemplateModel.importBean(Object bean)
void TemplateModel.importBean(Object bean, Predicate<String> propertyNameFilter)
T TemplateModel.getProxy(String modelPath, Class<T> beanType)
  • Support for setting lists of beans in the model
public interface EmployeesModel extends TemplateModel {
    public void setEmployees(List<Employee> employees);
}
  • Support for setting attributes on template elements from Java
  • Support for binding to attributes in templates using [attr.placeholder]="modelPart"
  • Shorthand for setting boolean attributes: Element.setAttribute(String, boolean)
  • Shorthand for clearing an Input value: Input.clear()
  • All builds are automatically scalability tested using Gatling

Fixes

  • Use of the @Id annotation has been clarified in some tutorials

Demos

  • Initial version of an Address book demo Java HTML

Tutorials

All changes

Don't miss a new flow release

NewReleases is sending notifications on new releases.