OddDev
OddDev

Reputation: 3734

What happened to com.vaadin.application?

Currently I need to build a awfully old project. After a few frustrating hours I decided to update the pom.xml to a state-of-the-art one. Of course I've changed the vaadin version while doing so. I've raised it from 6.8.12 to 7.6.7.

Not suprprisingly I've a lot of "cannot be resolved to a type" errors now. One of them is "Application cannot be resolved to a type." The import comes from "com.vaadin.application". I've never heard of this class and can find barely any information. What happend to it?

Upvotes: 0

Views: 173

Answers (1)

Morfic
Morfic

Reputation: 15518

While most APIs remain compatible, there have been many changes between the 2 versions, and the Application itself has been replaced by com.vaadin.ui.UI. Below an excerpt from the official migrating from Vaadin 6 to 7 guide:

The first code change that applies to every Vaadin 6 application concerns the com.vaadin.Application class - it exists no more. The main entry point to your application is now a com.vaadin.ui.UI, which replaces Application and its main window. When switching to UI, you also get multi-window support out of the box, so bye bye to any old hacks to make it work. On the flip side, a new UI is created on page reload. If you prefer to keep the UI state over page reloads in the same way Vaadin 6 does, just add @PreserveOnRefresh annotation on your UI class.

Upvotes: 4

Related Questions