This is Flow 2.0.1 version targeted for Vaadin 14.0.0.
NOTE: if you are using any pre-release version of Flow 2.0 / Vaadin 14 in your project, remove the following file when updating to 2.0.1 / 14.0.0.rc2:
- webpack-config.js
Optionally, if you still have issues, try removing:
- package.json & package-lock.json & node_modules
Changes and additions since 2.0.0
:
- Composite does not propagate navigation events #5817
- Frontend-only changes trigger full app restart #5947
- Lock polymer version to 3.2.0 #5962
- Update to latest tesbtench #5926
- Executing a Spring boot Application class starts it in compatibility/bower mode #5931
- Is frontend compiled successfully? #5939
- NPM mode gives unbearable startup time. #5803
Known limitations in 2.0.0
- In Eclipse IDE, "Run as -> Run on Server" is not working on npm mode (with eg. Tomcat) #5927
- To workaround, for now you need to do
mvn package
first
- To workaround, for now you need to do
- In IntelliJ IDEA, running a Spring Boot project with "Run" from IDE is not working on npm mode #5931
- Same for starting the app from Spring Boot
main
method - For now you need to use
mvn package spring-boot:run
- Same for starting the app from Spring Boot
- In npm mode, Spring Boot devtools reloading is broken after a while #5940
Flow 2.0 feature highlights:
npm & JavaScript Modules support
- requires that node.js is installed either globally on system or locally for project
- replaces webjars/Bower and HTML Imports, updates Polymer version 2 -> 3
- For demo, see starters like https://github.com/vaadin/beverage-starter-flow
- Existing V10-V13 (Flow 1.x) will work as is on 14 (Flow 2.0), but can opt-in to migrate from bower&p2&html-imports to npm&p3&es6modulese later on using the migration tool (#5037)
- Migration instructions and differences to previous version can be found here
Embedding Flow Components
- You can now Embed a Flow component to any* web page by exporting it as a web component.
- *some limitations apply for using web components from multiple sources and doing cross origin embedding, see documentation
- Documentation
@PreserverOnRefresh
- Adding
@PreserveOnRefresh
on a router layout or route will preserve the user edited component state when the user refreshes the page by reusing the component instances - Documentation
Small improvements
- It is possible to obtain details like screen width & height and time zone on the server side using
Page.retrieveExtendedClientDetails( ExtendedClientDetailsReceiver receiver)
- When executing JavaScript from the server side Java, it is possible to get the return value of the execution to the server side using
Page.executeJs(String expression, Serializable... parameters)
#5285
**The documentation for Flow 2.0 is available on vaadin.com/docs and the updated starters are available on vaadin.com/start **
See the complete list of changes since the previous version
Using Flow 2.0
New Flow 2.0 projects require that in addition to Java 8 and Maven you have node.js + npm installed. It can be installed either globally on your system or locally on the project, follow the instructions. Existing Flow 1.x projects updating to 2.0 will not need to install node, but can keep on running on bowerMode
.
Easiest way to obtain Flow 2.0 is by using some of the Vaadin 14 starters, available soon from https://vaadin.com/start. Flow 2.0 will be included in the vaadin
or vaadin-core
Maven dependencies starting from version 14, available from the Vaadin prereleases repository.