Book Image

Vaadin 7 Cookbook

Book Image

Vaadin 7 Cookbook

Overview of this book

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

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


Vaadin 7 has introduced a new capability for easy creation of bookmarkable applications with back and forward button support: the Navigator.

We will see how to use the Navigator class and what is needed to get it working. Navigator works with views, layouts that implement the View interface.

We are going to make an application with two views. We will be able to navigate between these two views with the back and forward buttons or make a bookmark.

The first view will be the welcome view, which we map to an empty URL fragment, so it becomes accessible at http://localhost:8080 address.

When a user clicks on the Open new Orders button, the orders view is displayed with the orders URL fragment.

How to do it...

Carry out the following steps to learn how to work with Views in Vaadin 7:

  1. Create a new Vaadin project with the main UI class called, for example, MyVaadinUI.

  2. Create the welcome view that will show a flattering...