20.8.1. Configuring the Field Factory .............................................................. 573
20.8.2. Using the Field Factory ....................................................................... 574
20.8.3. Master-Detail Editor ............................................................................ 575
20.9. Using JPAContainer with Hibernate ............................................................... 575
20.9.1. Lazy loading ...................................................................................... 575
20.9.2. Joins in Hibernate vs EclipseLink ........................................................ 576
Chapter 21. Mobile Applications with TouchKit ........................................................ 577
21.1. Overview ...................................................................................................... 578
21.1.1. TouchKit Demos ................................................................................ 580
21.1.2. Licensing ........................................................................................... 580
21.2. Considerations Regarding Mobile Browsing ................................................... 580
21.2.1. Mobile Human Interface ..................................................................... 580
21.2.2. Bandwidth and Performance .............................................................. 581
21.2.3. Mobile Features ................................................................................. 581
21.2.4. Compatibility ...................................................................................... 581
21.3. Installing Vaadin TouchKit ............................................................................. 582
21.4. Importing the Parking Demo .......................................................................... 582
21.5. Creating a New TouchKit Project ................................................................... 583
21.5.1. Using the Maven Archetype ............................................................... 583
21.5.2. Starting from a New Eclipse Project .................................................... 584
21.6. Elements of a TouchKit Application ................................................................ 585
21.6.1. The Servlet Class ............................................................................... 585
21.6.2. Defining Servlet and UI with web.xml Deployment Descriptor ............. 586
21.6.3. TouchKit Settings ............................................................................... 586
21.6.4. The UI ............................................................................................... 588
21.6.5. Mobile Widget Set .............................................................................. 588
21.6.6. Mobile Theme .................................................................................... 588
21.6.7. Using Font Icons ................................................................................ 590
21.7. Mobile User Interface Components ................................................................ 591
21.7.1. NavigationView ................................................................................ 592
21.7.2. Toolbar ............................................................................................ 593
21.7.3. NavigationManager ......................................................................... 593
21.7.4. NavigationButton ............................................................................ 595
21.7.5. Popover ........................................................................................... 597
21.7.6. SwipeView ....................................................................................... 601
21.7.7. Switch .............................................................................................. 602
21.7.8. VerticalComponentGroup ............................................................... 602
21.7.9. HorizontalButtonGroup ................................................................... 604
21.7.10. TabBarView ................................................................................... 604
21.7.11. EmailField ...................................................................................... 605
21.7.12. NumberField .................................................................................. 606
21.7.13. UrlField .......................................................................................... 607
21.8. Advanced Mobile Features ............................................................................ 608
21.8.1. Providing a Fallback UI ...................................................................... 608
21.8.2. Geolocation ....................................................................................... 609
21.8.3. Storing Data in the Local Storage ........................................................ 609
21.9. Offline Mode ................................................................................................. 610
21.9.1. Enabling the Cache Manifest .............................................................. 611
21.9.2. Disabling Offline Mode ....................................................................... 611
21.9.3. Configuring Offline Mode .................................................................... 611
21.9.4. The Offline User Interface ................................................................... 612
21.9.5. Sending Data to Server ...................................................................... 612
21.9.6. The Offline Theme .............................................................................. 612
xiv
Book of Vaadin