O'Reilly logo

Vaadin 7 Cookbook by Ondrej Kvasnovsky, Jaroslav Holan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Grails services in Vaadin

We will make a bit of an interactive application in this recipe. A client will be able to add new users into the database and the user interface will reflect the actual state of the User database table.

The following screenshot shows what we are going to develop in this recipe:

Using Grails services in Vaadin

How to do it...

Carry out the following steps, in order to use Grails services inside Vaadin application:

  1. Create a new domain class called User inside the grails-app/domain folder.
    class User {
    
      String name
    
      static constraints = {
      }
    }
  2. Create a new service for the User class. We will implement the getAll method that returns all the users from the database ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required