Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Vaadin 7 Cookbook
  • Table Of Contents Toc
Vaadin 7 Cookbook

Vaadin 7 Cookbook

4.3 (9)
close
close
Vaadin 7 Cookbook

Vaadin 7 Cookbook

4.3 (9)

Overview of this book

Table of Contents (19 chapters)
close
close
Vaadin 7 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1
Index

Using Grails ORM for Vaadin application


We will create a simple application that will have access to the database. In the database, there will be one entity, User. A visitor of our application will see the list of the users fetched from the database (it is going to be two women's names, Sara and Ester).

How to do it…

Carry out the following steps in order to connect a Vaadin application with the database in a Grails environment:

  1. First, we need to make a new domain class named User. This class will be placed inside the domain folder.

  2. A new dialog window appears and we just type in user. The package name is automatically taken from the name of the project. If we want to specify a different package name, we just type the full name of the class, such as mycomp.User.

    Alternatively, we can create the domain class from the Grails command line:

    grails create-domain-class user
    
  3. The User class has been generated into the domain folder inside the vaadin.grails.gorm package. We will add a new field that...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Vaadin 7 Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon