You are previewing Vaadin 7 Cookbook.
O'Reilly logo
Vaadin 7 Cookbook

Book Description

Take the shortcut to developing rich internet applications in pure Java. Vaadin makes it easy and this cookbook makes it easier still with its practical recipes and straightforward approach.

  • Covers exciting features such as using drag and n anddrop, creating charts, custom components, lazy loading, server-push functionality, and more

  • Tips for facilitating the development and testing of Vaadin applications

  • Enhance your applications with Spring, Grails, or Roo integration

  • In Detail

    It is really expensive and demanding to develop Rich Internet Applications from scratch. Vaadin is an amazing framework that contains many ready-made components for the creation of user interfaces. Applications created in Vaadin are compatible with all the latest versions of web browsers. Although the screenshots in this book are from Chrome, examples can also run on other browsers like Firefox Mozilla, Internet Explorer, and Opera.

    "Vaadin 7 Cookbook" contains many practical recipes that we have gathered during the development of Vaadin applications. This book will help you to take your learning experience to the next level by giving you many solutions to the common problems faced along with explanations. There is even more than that. Vaadin 7 Cookbook goes beyond the basics and shows you how to build Vaadin application for real-world scenarios.

    "Vaadin 7 Cookbook" starts with the creation of a project in various tools and languages then moves to components, layouting, events, data binding, and custom widgets. Vaadin, together with Grails, is a powerful tool for the rapid development of RIA applications and this is described in a chapter on how to work with GORM, Service, compiling a widgetset. The quality and stability of the application, testing the Vaadin code, and data management of Vaadin is also explained in detail.

    "Vaadin 7 Cookbook" is focused on learning and understanding how to work with Vaadin as well as trying out Vaadin with other technologies such as Grails.

    Table of Contents

    1. Vaadin 7 Cookbook
      1. Table of Contents
      2. Vaadin 7 Cookbook
      3. Credits
      4. About the Authors
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Creating a Project in Vaadin
        1. Introduction
        2. Creating a project in Eclipse IDE
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Generating a Vaadin project in Maven archetype
          1. How to do it...
          2. How it works...
          3. There's more...
        4. Building a Vaadin application with Gradle
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        5. Using Vaadin with Scala
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Running Vaadin on Grails
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      9. 2. Layouts
        1. Introduction
        2. Creating an adjustable layout using split panels
          1. How to do it...
          2. How it works...
          3. See also
        3. Creating a custom layout
          1. How to do it...
          2. How it works...
        4. Controlling components over the CSS layout
          1. How to do it...
          2. How it works...
          3. See also
        5. Using CSS layouts for mobile devices
          1. How to do it...
          2. How it works...
          3. See also
        6. Binding tabs with a hard URL
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        7. Using Navigator for creating bookmarkable applications with back-forward button support
          1. How to do it...
          2. How it works...
          3. There's more...
        8. Aligning components on a page
          1. How to do it...
          2. How it works...
          3. See also
        9. Creating UI collections of components
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        10. Dragging-and-dropping between different layouts
          1. How to do it...
          2. How it works...
          3. See also
        11. Building any layout with AbsoluteLayout
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
      10. 3. UI Components
        1. Introduction
        2. Viewing details of items in ListSelect
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        3. Inserting a button to remove a table row
          1. How to do it...
          2. How it works...
          3. See also
        4. Creating a line chart with Flot
          1. How to do it...
          2. How it works...
          3. There's more...
        5. Creating a pie chart with Highcharts
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Drag-and-drop from the desktop
          1. How to do it...
          2. How it works...
          3. See also
        7. Using DateField with Joda-Time DateTime
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        8. Zooming with the slider
          1. How to do it...
          2. How it works...
        9. Restricting buttons in Rich text area
          1. How to do it...
          2. How it works...
          3. There's more...
        10. Styling components with CSS
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
      11. 4. Custom Widgets
        1. Introduction
        2. Creating a TextField with counter
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        3. Creating a TextField only for digits
          1. How to do it...
          2. How it works...
          3. See also
        4. Creating a chroma-hash password field
          1. How to do it...
          2. How it works...
        5. Creating a tri-state checkbox using JavaScript
          1. How to do it...
          2. How it works...
        6. Styling widgets
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Speeding up widget set compilation
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      12. 5. Events
        1. Introduction
        2. Responding immediately to an event in TextArea
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        3. Changing Label to TextField by double-clicking
          1. How to do it...
          2. How it works...
          3. See also
        4. Lazy loading in a table
          1. How to do it...
          2. How it works...
          3. See also
        5. Reordering columns and rows in a table
          1. How to do it...
          2. How it works...
          3. See also
        6. Customizing shortcuts
          1. How to do it...
          2. See also
        7. Adding click listener to the Link component
          1. Getting ready
          2. How to do it...
          3. See also
        8. Creating a custom context menu
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        9. Updating messages in the menu bar using the ICEPush add-on
          1. Getting ready
          2. How to do it...
          3. There's more...
          4. See also
        10. Updating the noticeboard using the Refresher add-on
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      13. 6. Messages
        1. Introduction
        2. Showing validation messages
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        3. Styling system messages
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Showing a login form in pop-up view
          1. How to do it...
          2. How it works...
        5. Customizing tray notifications
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Making a confirmation window
          1. How to do it...
          2. How it works...
        7. Showing a rich tooltip with an image
          1. How to do it...
          2. How it works...
          3. There's more...
        8. Informing about file transfers by a progress bar
          1. How to do it…
          2. How it works...
          3. There's more...
        9. Waiting for an indeterminate process
          1. How to do it...
          2. How it works...
        10. Showing information about browsers
          1. How to do it...
          2. How it works...
      14. 7. Working with Forms
        1. Introduction
        2. Creating a simple form
          1. How to do it...
        3. Generating fields from a bean
          1. How to do it...
          2. There's more...
        4. Binding fields to a bean
          1. How to do it...
          2. How it works...
        5. Using field validation
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        6. Using bean validation
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        7. Creating a custom validation
          1. How to do it...
          2. How it works...
          3. See also
        8. Creating a CRUD form
          1. How to do it...
          2. How it works...
          3. There's more...
        9. Filtering items using ComboBox
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
      15. 8. Spring and Grails Integration
        1. Introduction
        2. Setting up a Vaadin project with Spring in Maven
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        3. Handling login with Spring
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Accessing a database with Spring
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        5. Internationalizing Vaadin applications with Spring
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Vaadin and Spring injector
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Internationalizing Vaadin in Grails
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        8. Using Grails ORM for Vaadin application
          1. How to do it…
          2. How it works...
          3. There's more...
        9. Using Grails services in Vaadin
          1. How to do it...
          2. How it works...
        10. Adding a Vaadin add-on into Grails project
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      16. 9. Data Management
        1. Introduction
        2. Binding property to a component
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        3. Binding items to a component
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        4. Binding a container to a component
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        5. Creating a complex table – CRUD II
          1. How to do it...
          2. How it works...
          3. See also
        6. Filtering data in the table
          1. How to do it...
          2. How it works...
          3. There's more...
          4. See also
        7. Using converters
          1. How to do it...
          2. See also
        8. Storing the last selected tab name in cookies
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      17. 10. Architecture and Performance
        1. Introduction
        2. Building the core
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. The Login form with Model View Presenter
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        4. Model View Presenter for a view with two panels
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        5. Unit testing in an MVP pattern
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        6. Improving the application's startup time
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Avoid sluggish UI – lazy loaded tables
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
          5. See also
        8. Avoid sluggish UI – paged tables
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        9. Optimizing Vaadin applications for search engines
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
      18. 11. Facilitating Development
        1. Introduction
        2. The basics of test-driven development in Vaadin
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. The basics of mocking in Vaadin
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        4. Testing a table with a container
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Testing the UI with TestBench
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Recompiling widgetsets in Maven
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Auto-reloading changes in Maven
          1. How to do it…
          2. How it works...
        8. Blocking uncaught exceptions in the production mode
          1. How to do it...
          2. How it works...
      19. 12. Fun
        1. Introduction
        2. Magic tricks
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        3. Can you raed tihs?
          1. How to do it...
          2. How it works...
          3. See also
        4. Goodbye, world!
          1. How to do it...
          2. How it works...
          3. See also
      20. Index