github vaadin/flow 0.0.8
Template model, inclusion, component mapping and class binding

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

New features

  • Template model with support for basic types: boolean, int, double, String
public class MyTemplate extends Template {
    public interface MyModel extends TemplateModel {
        public void setHelloText(String helloText);
        public String getHelloText();
    }
    @Override
    public MyModel getModel() {
        return (MyModel) super.getModel();
    }
}
  • Including a template in another template, e.g. <div>@include path/file.html@</div>
  • Support for inline <script> and <style> in templates
  • Class name bindings in templates, e.g.
<div [class.myclass]="myClassEnabled"></div>
public interface MyModel extends TemplateModel {
    public boolean isMyClassEnabled();
}
  • Mapping template elements to components using id, e.g.
<paper-slider id="myslider">
@Id("myslider") 
private PaperSlider mySlider;
  • Mapping an element to a Component using Component.from(Element)
  • More basic components wrapping HTML elements: Emphasis, H1, H2, H3, H4, H5, H6, Span
  • Support for using most Element features with template elements
    • Element properties
    • Synchronized properties
    • DOM event listeners
  • Element.getOuterHtml to return the outer HTML for an element
  • Support for boolean and int type properties in PropertyDescriptor
  • Support for sending Json values from the client to the server

Fixes

  • Correctly detect loading of CSS files in Safari again
  • Resolver.resolve and RouterConfiguration.resolveRoute return Optional instead of null
  • Propert handling of @EventHandling methods with varargs
  • Hello world session size reduced from 9.23KB to 5.97KB
  • RouterLink now has a getter for href
  • PropertyDescriptor can be used with any Element
  • An unresolvable route now returns 404 to the browser
  • Replaced LGPL CSS Parser library with Apache 2 ph-css

Demos

  • Web site demo updated to use template class bindings Java HTML
  • Hello world using templates updated to use template model Java HTML

Tutorials

All changes

Don't miss a new flow release

NewReleases is sending notifications on new releases.