Author(s): Vaadin Team
Series: 1
Edition: 1
Publisher: Vaadin Ltd.
Year: 2019
Language: English
Pages: 817
City: Ruukinkatu 2-4 20540 Turku, Finland
Book of Vaadin......Page 1
Abstract......Page 2
Table of Contents......Page 3
Who is this Book for?......Page 9
Supplementary Material......Page 10
Getting Support......Page 11
1. Introduction......Page 13
1.1. Core concepts......Page 14
1.2. Why Vaadin?......Page 15
2.1. Development Toolchain......Page 17
2.2. Starters and Maven Archetypes......Page 21
2.3. Exploring the Project......Page 23
2.4. Running and Debugging......Page 25
3.1. Vaadin Architecture......Page 27
3.2. Building UIs with Components......Page 29
3.3. Routing and Navigation......Page 32
3.4. How Vaadin Components Work......Page 33
4. Using Vaadin Components......Page 36
4.1. Form Input Fields......Page 37
4.2. Visualization and Interaction......Page 49
4.3. Data Components......Page 56
4.4. Layouts......Page 60
4.5. Installing the Components......Page 65
4.6. Vaadin Component Directory......Page 66
5.1. Binding to Data......Page 67
5.2. Handling Selection Changes......Page 68
5.3. Handling Item-click Events......Page 73
5.4. Configuring Columns......Page 74
5.5. Using Renderers in Columns......Page 81
5.6. Enabling Expanding Rows......Page 90
5.7. Column Sorting......Page 91
5.8. Styling the Grid......Page 97
6.1. Binding Data to Forms......Page 103
6.2. Validating and Converting User Input......Page 106
6.3. Loading From and Saving To Business Objects......Page 115
6.4. Binding Beans to Forms......Page 120
6.5. Showing a List of Data with Data Providers......Page 126
6.6. Creating a Component that Has a Value......Page 145
7.1. Using the @Route Annotation......Page 158
7.2. Navigation Lifecycle......Page 159
7.3. Router Layouts and Nested Router Targets......Page 166
7.4. Routing and URL Parameters......Page 170
7.5. URL Generation......Page 174
7.6. Navigating Between Routes......Page 176
7.7. Preserving the State on Refresh......Page 178
7.8. Router Exception Handling......Page 181
7.9. Getting Registered Routes......Page 187
7.10. Updating the Page Title During Navigation......Page 188
7.11. Registering Routes Dynamically......Page 190
8.2. Executing JavaScript in the Browser......Page 200
9.1. Introduction to Embedding Applications......Page 202
9.2. Embedded Application Properties......Page 205
9.3. Theming Embedded Applications......Page 212
9.4. Securing Embedded Applications......Page 213
9.5. Creating an Embedded Vaadin Application Tutorial......Page 217
9.6. Embedding Applications in Compatibility and Production Mode......Page 226
9.7. Configuring Push in Embedded Applications......Page 228
9.8. Embedded Application Limitations......Page 229
10.1. Application Theming Basics......Page 232
10.2. Integrating a Custom Component Theme......Page 235
10.3. Theming Web Components......Page 238
10.4. Theming Overview......Page 244
10.5. Using Component Themes......Page 245
10.6. Theming Overlay Components......Page 253
10.7. Migrating Theming Files from Polymer 2 to Polymer 3......Page 256
11.1. Using Vaadin with Spring Boot......Page 259
11.2. Using Vaadin with Spring MVC......Page 262
11.3. Using Routing with Spring......Page 265
11.4. Vaadin Spring Scopes......Page 268
11.5. Vaadin Spring Configuration......Page 272
11.6. Getting Started with Spring and Vaadin......Page 274
12.1. Using Vaadin with CDI......Page 276
12.3. Using CDI Beans in Instantiated Components......Page 278
12.4. Vaadin CDI Contexts......Page 281
12.5. Observable Vaadin Events......Page 289
12.6. Vaadin Service Interfaces as CDI Beans......Page 291
12.7. Getting Started with CDI and Vaadin......Page 292
13.1. Introduction......Page 294
13.2. Creating PWAs with Vaadin......Page 295
13.3. PWA Application Icons......Page 296
13.4. PWA Web App Manifest......Page 298
13.5. PWA Service Worker......Page 300
13.6. PWA Offline Page......Page 302
14.1. Element Properties and Attributes......Page 304
14.2. Listening to User Events Using the Element API......Page 308
14.3. Remote Procedure Calls......Page 310
14.4. Retrieving User Input Using the Element API......Page 314
14.5. Dynamic Styling Using the Element API......Page 315
14.6. Using the Shadow Root in Server-side Elements......Page 318
15.1. Creating Components Overview......Page 321
15.2. Creating a Simple Component Using the Element API......Page 322
15.3. Creating a Component with Multiple Elements......Page 324
15.4. Using API Helpers to Define Component Properties......Page 326
15.5. Creating a Component Using Existing Components......Page 329
15.6. Extending Components......Page 331
15.7. Using Events with Components......Page 339
15.8. Creating a Component Container......Page 347
15.9. Using Component Lifecycle Callbacks......Page 351
15.10. Using Vaadin Mixin Interfaces......Page 354
16.1. What are Web Components?......Page 359
16.2. Integrating a Web Component......Page 361
16.3. Creating Java API for a Web Component......Page 365
16.4. Debugging a Web Component Integration......Page 377
16.6. Creating an In-project Web Component......Page 379
17.1. Taking your Application into Production......Page 382
17.2. Advanced production mode topics......Page 385
17.3. How to Run and Deploy a Flow Application on Jetty......Page 388
18.1. Vaadin OSGi Support......Page 397
18.2. Create OSGi compatible components......Page 408
19.1. Migrating from Vaadin 8 to Vaadin platform......Page 413
19.2. Migration Strategies......Page 416
19.3. Differences Between Vaadin 10+ and V8 Applications......Page 419
19.4. Routing and Navigation......Page 422
19.5. Components in Vaadin platform......Page 424
19.6. Themes and Theming Applications......Page 438
19.7. Add-ons, Integrations and Tools......Page 442
19.8. Migration example - Bookstore Starter......Page 446
20.1. App Layout 2 Migration Guide......Page 463
20.2. Migration Tool for Polymer Templates......Page 466
20.3. Vaadin 14 Migration Guide......Page 468
21. Vaadin Designer......Page 489
21.1. Installation......Page 490
21.2. Using Vaadin Designer......Page 513
21.3. Tutorials......Page 525
22.1. Overview......Page 544
22.2. Installing Vaadin Charts for Flow......Page 545
22.3. Basic Use......Page 546
22.4. Chart Types......Page 553
22.5. Chart Configuration......Page 591
22.6. Chart Data......Page 604
22.7. CSS Styling......Page 613
22.8. Breaking Changes in Version 6......Page 618
22.9. Timeline......Page 622
23.1. Overview......Page 626
23.2. Getting Started......Page 628
23.3. Installing Web Drivers......Page 633
23.4. Creating Tests......Page 635
23.5. Creating Maintainable Tests using Page Objects......Page 638
23.6. Low Level Element Interactions......Page 645
23.7. Taking and Comparing Screenshots......Page 647
23.8. Advanced Testing Concepts......Page 655
23.9. Making Tests Reliable......Page 661
23.10. Behavior-Driven Development......Page 665
23.11. Running Tests with Maven......Page 667
23.12. Running Tests on a CI Server......Page 671
23.13. Running Tests on Multiple Browsers in a Grid......Page 676
23.14. Setting up your Own Test Grid......Page 682
23.15. Migrating to Vaadin 10......Page 685
24.2. Configuration and advanced topics......Page 688
24.3. Step-by-step migration guide......Page 689
24.4. Configuration and advanced topics......Page 723
25.1. Application Lifecycle......Page 742
25.2. I18N localization......Page 750
25.3. Modifying the bootstrap page......Page 756
25.4. Changing Flow behavior with runtime configuration.......Page 765
25.5. The Loading Indicator......Page 769
25.6. Server Push Configuration......Page 776
25.7. Asynchronous Updates......Page 778
25.8. Creating Collaborative Views......Page 781
25.9. Modifying how dependencies are loaded with DependencyFilters......Page 784
25.10. VaadinServiceInitListener......Page 786
25.11. Dynamic Content......Page 788
25.12. History API......Page 792
25.14. UIInitListener......Page 795
25.15. Making a component add-on OSGi-compatible......Page 796
25.16. All Vaadin properties......Page 800