PacktLib: Vaadin 7 Cookbook

Vaadin 7 Cookbook

Credits

About the Authors

About the Reviewers

www.PacktPub.com

Preface

Creating a Project in Vaadin

Introduction

Creating a project in Eclipse IDE

Generating a Vaadin project in Maven archetype

Building a Vaadin application with Gradle

Using Vaadin with Scala

Running Vaadin on Grails

Layouts

Introduction

Creating an adjustable layout using split panels

Creating a custom layout

Controlling components over the CSS layout

Using CSS layouts for mobile devices

Binding tabs with a hard URL

Using Navigator for creating bookmarkable applications with back-forward button support

Aligning components on a page

Creating UI collections of components

Dragging-and-dropping between different layouts

Building any layout with AbsoluteLayout

UI Components

Introduction

Viewing details of items in ListSelect

Inserting a button to remove a table row

Creating a line chart with Flot

Creating a pie chart with Highcharts

Drag-and-drop from the desktop

Using DateField with Joda-Time DateTime

Zooming with the slider

Restricting buttons in Rich text area

Styling components with CSS

Custom Widgets

Introduction

Creating a TextField with counter

Creating a TextField only for digits

Creating a chroma-hash password field

Creating a tri-state checkbox using JavaScript

Styling widgets

Speeding up widget set compilation

Events

Introduction

Responding immediately to an event in TextArea

Changing Label to TextField by double-clicking

Lazy loading in a table

Reordering columns and rows in a table

Customizing shortcuts

Adding click listener to the Link component

Creating a custom context menu

Updating messages in the menu bar using the ICEPush add-on

Updating the noticeboard using the Refresher add-on

Messages

Introduction

Showing validation messages

Styling system messages

Showing a login form in pop-up view

Customizing tray notifications

Making a confirmation window

Showing a rich tooltip with an image

Informing about file transfers by a progress bar

Waiting for an indeterminate process

Showing information about browsers

Working with Forms

Introduction

Creating a simple form

Generating fields from a bean

Binding fields to a bean

Using field validation

Using bean validation

Creating a custom validation

Creating a CRUD form

Filtering items using ComboBox

Spring and Grails Integration

Introduction

Setting up a Vaadin project with Spring in Maven

Handling login with Spring

Accessing a database with Spring

Internationalizing Vaadin applications with Spring

Vaadin and Spring injector

Internationalizing Vaadin in Grails

Using Grails ORM for Vaadin application

Using Grails services in Vaadin

Adding a Vaadin add-on into Grails project

Data Management

Introduction

Binding property to a component

Binding items to a component

Binding a container to a component

Creating a complex table – CRUD II

Filtering data in the table

Using converters

Storing the last selected tab name in cookies

Architecture and Performance

Introduction

Building the core

The Login form with Model View Presenter

Model View Presenter for a view with two panels

Unit testing in an MVP pattern

Improving the application's startup time

Avoid sluggish UI – lazy loaded tables

Avoid sluggish UI – paged tables

Optimizing Vaadin applications for search engines

Facilitating Development

Introduction

The basics of test-driven development in Vaadin

The basics of mocking in Vaadin

Testing a table with a container

Testing the UI with TestBench

Recompiling widgetsets in Maven

Auto-reloading changes in Maven

Blocking uncaught exceptions in the production mode

Fun

Introduction

Magic tricks

Can you raed tihs?

Goodbye, world!

Index