Table of Contents

1. Introduction
1.1. Overview
1.2. Example Application Walkthrough
1.3. Support for the Eclipse IDE
1.4. Goals and Philosophy
1.5. Background
2. Getting Started with Vaadin
2.1. Setting up the Development Environment
2.1.1. Installing Java SDK
2.1.2. Installing Eclipse IDE
2.1.3. Installing Apache Tomcat
2.1.4. Firefox and Firebug
2.2. Installing Vaadin
2.2.1. Vaadin Plugin for Eclipse
2.2.2. Installing the JAR Package
2.3. Your First Project with Vaadin
2.3.1. Creating the Project
2.3.2. Exploring the Project
2.3.3. Setting Up and Starting the Web Server
2.3.4. Running and Debugging
2.4. Creating a Project with NetBeans
2.4.1. Regular Web Application Project
2.4.2. Maven Project from Vaadin Archetype
2.5. Creating a Project with Maven
3. Architecture
3.1. Overview
3.2. Technological Background
3.2.1. AJAX
3.2.2. Google Web Toolkit
3.2.3. JSON
3.3. Applications as Java Servlet Sessions
3.4. Client-Side Engine
3.5. Events and Listeners
4. Writing a Web Application
4.1. Overview
4.2. Managing the Main Window
4.3. Sub-Windows
4.3.1. Opening and Closing a Sub-Window
4.3.2. Window Positioning
4.3.3. Scrolling Sub-Window Content
4.3.4. Modal Windows
4.4. Handling Events with Listeners
4.5. Referencing Resources
4.5.1. Resource Interfaces and Classes
4.5.2. File Resources
4.5.3. Class Loader Resources
4.5.4. Theme Resources
4.5.5. Stream Resources
4.6. Shutting Down an Application
4.6.1. Closing an Application
4.6.2. Handling the Closing of a Window
4.7. Handling Errors
4.7.1. Error Indicator and message
4.7.2. Notifications
4.7.3. Customizing System Messages
4.7.4. Handling Uncaught Exceptions
4.8. Setting Up the Application Environment
4.8.1. Creating Deployable WAR in Eclipse
4.8.2. Web Application Contents
4.8.3. Deployment Descriptor web.xml
5. User Interface Components
5.1. Overview
5.2. Interfaces and Abstractions
5.2.1. Component Interface
5.2.2. AbstractComponent
5.2.3. Field Components (Field and AbstractField)
5.3. Common Component Features
5.3.1. Caption
5.3.2. Description and Tooltips
5.3.3. Enabled
5.3.4. Icon
5.3.5. Locale
5.3.6. Read-Only
5.3.7. Style Name
5.3.8. Visible
5.3.9. Sizing Components
5.3.10. Managing Input Focus
5.4. Label
5.4.1. Content Mode
5.4.2. Making Use of the XHTML Mode
5.4.3. Spacing with a Label
5.4.4. CSS Style Rules
5.5. Link
5.6. TextField
5.6.1. Data Binding
5.6.2. String Length
5.6.3. Handling Null Values
5.6.4. Text Change Events
5.6.5. CSS Style Rules
5.7. TextArea
5.8. PasswordField
5.9. RichTextArea
5.10. Date and Time Input with DateField
5.10.1. PopupDateField
5.10.2. InlineDateField
5.10.3. Time Resolution
5.10.4. DateField Locale
5.11. Button
5.12. CheckBox
5.13. Selecting Items
5.13.1. Binding Selection Components to Data
5.13.2. Basic Select Component
5.13.3. ListSelect
5.13.4. Native Selection Component NativeSelect
5.13.5. Radio Button and Check Box Groups with OptionGroup
5.13.6. Twin Column Selection with TwinColSelect
5.13.7. Allowing Adding New Items
5.13.8. Multiple Selection Mode
5.13.9. Other Common Features
5.14. Table
5.14.1. Selecting Items in a Table
5.14.2. Table Features
5.14.3. Editing the Values in a Table
5.14.4. Column Headers and Footers
5.14.5. Generated Table Columns
5.14.6. Formatting Table Columns
5.14.7. CSS Style Rules
5.15. Tree
5.16. MenuBar
5.17. Embedded
5.17.1. Embedded Objects
5.17.2. Embedded Images
5.17.3. Browser Frames
5.18. Upload
5.19. Form
5.19.1. Form as a User Interface Component
5.19.2. Binding Form to Data
5.19.3. Validating Form Input
5.19.4. Buffering Form Data
5.20. ProgressIndicator
5.20.1. Doing Heavy Computation
5.21. Slider
5.22. LoginForm
5.22.1. Customizing LoginForm
5.23. Component Composition with CustomComponent
6. Managing Layout
6.1. Overview
6.2. Window and Panel Root Layout
6.3. VerticalLayout and HorizontalLayout
6.3.1. Sizing Contained Components
6.4. GridLayout
6.4.1. Sizing Grid Cells
6.5. FormLayout
6.6. Panel
6.6.1. Scrolling the Panel Content
6.7. HorizontalSplitPanel and VerticalSplitPanel
6.8. TabSheet
6.9. Accordion
6.10. AbsoluteLayout
6.11. CssLayout
6.12. Layout Formatting
6.12.1. Layout Size
6.12.2. Layout Cell Alignment
6.12.3. Layout Cell Spacing
6.12.4. Layout Margins
6.13. Custom Layouts
7. Visual User Interface Design with Eclipse
7.1. Overview
7.2. Creating a New Composite
7.3. Using The Visual Designer
7.3.1. Adding New Components
7.3.2. Setting Component Properties
7.3.3. Editing an AbsoluteLayout
7.4. Structure of a Visually Editable Component
7.4.1. Sub-Component References
7.4.2. Sub-Component Builders
7.4.3. The Constructor
8. Themes
8.1. Overview
8.2. Introduction to Cascading Style Sheets
8.2.1. Basic CSS Rules
8.2.2. Matching by Element Class
8.2.3. Matching by Descendant Relationship
8.2.4. Notes on Compatibility
8.3. Creating and Using Themes
8.3.1. Styling Standard Components
8.3.2. Built-in Themes
8.3.3. Using Themes
8.3.4. Theme Inheritance
8.4. Creating a Theme in Eclipse
9. Binding Components to Data
9.1. Overview
9.2. Properties
9.2.1. Property Viewers and Editors
9.2.2. ObjectProperty Implementation
9.2.3. Implementing the Property Interface
9.3. Holding properties in Items
9.3.1. The PropertysetItem Implementation
9.3.2. Wrapping a Bean in a BeanItem
9.4. Collecting Items in Containers
9.4.1. BeanContainer
9.4.2. BeanItemContainer
9.4.3. Iterating Over a Container
9.4.4. Filterable Containers
10. Vaadin SQLContainer
10.1. Architecture
10.2. Getting Started with SQLContainer
10.2.1. Creating a connection pool
10.2.2. Creating the TableQuery Query Delegate
10.2.3. Creating the Container
10.3. Filtering and Sorting
10.3.1. Filtering
10.3.2. Sorting
10.4. Editing
10.4.1. Adding items
10.4.2. Fetching generated row keys
10.4.3. Version column requirement
10.4.4. Auto-commit mode
10.4.5. Modified state
10.5. Caching, Paging and Refreshing
10.5.1. Container Size
10.5.2. Page Length and Cache Size
10.5.3. Refreshing the Container
10.5.4. Cache Flush Notification Mechanism
10.6. Referencing Another SQLContainer
10.7. Using FreeformQuery and FreeformStatementDelegate
10.8. Non-implemented methods of Vaadin container interfaces
10.9. Known Issues and Limitations
11. Developing New Components
11.1. Overview
11.2. Doing It the Simple Way in Eclipse
11.2.1. Creating a Widget
11.2.2. Recompiling the Widget Set
11.2.3. Plugin Related Project Settings
11.3. Google Web Toolkit Widgets
11.3.1. Extending a Vaadin Widget
11.3.2. Example: A Color Picker GWT Widget
11.3.3. Styling GWT Widgets
11.4. Integrating a GWT Widget
11.4.1. Deserialization of Component State from Server
11.4.2. Serialization of Component State to Server
11.4.3. Example: Integrating the Color Picker Widget
11.5. Defining a Widget Set
11.6. Server-Side Components
11.6.1. Binding to the Client-Side Widget
11.6.2. Server-Client Serialization
11.6.3. Client-Server Deserialization
11.6.4. Example: Color Picker Server-Side Component
11.7. Using a Custom Component
11.7.1. Example: Color Picker Application
11.7.2. Web Application Deployment
11.8. GWT Widget Development
11.8.1. Creating a Widget Project
11.8.2. Importing GWT Installation Package
11.8.3. Writing the Code
11.8.4. Compiling GWT Widget Sets
11.8.5. Ready to Run
11.8.6. GWT Development Mode
11.8.7. Packaging a Widget Set
11.8.8. Troubleshooting
12. Advanced Web Application Topics
12.1. Special Characteristics of AJAX Applications
12.2. Application-Level Windows
12.2.1. Creating New Application-Level Windows
12.2.2. Creation of Windows When Requested
12.2.3. Dynamic Multi-Window Applications
12.2.4. Closing Windows
12.2.5. Caveats in Using Multiple Windows
12.3. Embedding Applications in Web Pages
12.3.1. Embedding Inside a div Element
12.3.2. Embedding Inside an iframe Element
12.3.3. Cross-Site Embedding with the Vaadin XS Add-on
12.4. Debug and Production Mode
12.4.1. Debug Mode
12.4.2. Analyzing Layouts
12.4.3. Custom Layouts
12.4.4. Debug Functions for Component Developers
12.5. Resources
12.5.1. URI Handlers
12.5.2. Parameter Handlers
12.6. Shortcut Keys
12.6.1. Click Shortcuts for Default Buttons
12.6.2. Field Focus Shortcuts
12.6.3. Generic Shortcut Actions
12.6.4. Supported Key Codes and Modifier Keys
12.7. Printing
12.8. Google App Engine Integration
12.9. Common Security Issues
12.9.1. Sanitizing User Input to Prevent Cross-Site Scripting
12.10. URI Fragment and History Management with UriFragmentUtility
12.11. Capturing HTTP Requests
12.11.1. Using Request and Response Objects
12.11.2. Managing Cookies
12.12. Drag and Drop
12.12.1. Handling Drops
12.12.2. Dropping Items On a Tree
12.12.3. Dropping Items On a Table
12.12.4. Accepting Drops
12.12.5. Dragging Components
12.12.6. Dropping on a Component
12.12.7. Dragging Files from Outside the Browser
12.13. Logging
12.14. Accessing Session-Global Data
12.14.1. Passing References Around
12.14.2. Overriding attach()
12.14.3. ThreadLocal Pattern
13. Portal Integration
13.1. Deploying to a Portal
13.2. Creating a Portal Application Project in Eclipse
13.3. Portlet Deployment Descriptors
13.4. Portlet Hello World
13.5. Installing Vaadin in Liferay
13.6. Handling Portlet Requests
13.7. Handling Portlet Mode Changes
13.8. Non-Vaadin Portlet Modes
13.9. Vaadin Control Panel for Liferay
13.9.1. Installing
13.9.2. Using the Control Panel
13.10. Vaadin IPC for Liferay
13.10.1. Installing the Add-on
13.10.2. Basic Communication
13.10.3. Considerations
13.10.4. Communication Through Session Attributes
13.10.5. Serializing and Encoding Data
13.10.6. Communicating with Non-Vaadin Portlets
13.11. Remote Portlets with WSRP
13.11.1. Installing the Add-on
13.11.2. Configuring a Remote Portlet
13.11.3. Producer Configuration
13.11.4. Consumer Configuration
13.11.5. Advanced Configuration
14. Rapid Development Using Vaadin and Roo
14.1. Overview
14.2. Setting Up the Environment
14.2.1. Installing Spring Roo
14.2.2. Creating the Project
14.2.3. Installing Vaadin Plugin for Spring Roo
14.2.4. Setting up the Roo Data Layer
14.3. Creating the Domain Model
14.3.1. Domain Model Design
14.3.2. Creating the Model in Roo
14.4. Creating Vaadin Application and CRUD Views
14.4.1. Creating the Application Skeleton
14.4.2. Generating CRUD Views
14.4.3. Deploying to Development Server
14.5. Using Vaadin Add-ons in a Roo project
14.5.1. Installing Add-ons
14.5.2. Compiling the Widget Set
14.5.3. Configuring the Deployment Assembly
14.6. Customizing Views
14.6.1. Modifying Roo generated entity form
14.6.2. Creating a Calendar View for Filling Work Entries
14.6.3. Creating a Custom View for Reporting
14.7. Authentication and Authorization
14.7.1. Implementing Authentication and Authorization
14.8. Internationalization
14.9. Testing the Application
14.9.1. Overview of Testing
14.9.2. Running the Test Server
14.9.3. Installing TestBench with Maven
14.9.4. Generating JUnit Tests
14.9.5. Configuring System Properties
14.9.6. Notes
14.10. Exception Handling
14.10.1. Preventing Stacktraces in the UI
14.10.2. Where to Catch Exceptions
14.11. Deploying to Cloud Foundry
14.11.1. Installing the Cloud Foundry Plug-in in STS
14.11.2. Deploying the Application
14.11.3. Binding to the MySQL Service