Logout in Vaadin 7

Before Vaadin 7 we needed to extend the Application that had the method close() which was called appropriately when application is being logged-out/browser-closed/refreshed/ etc

But now I have Root class that does not have any method like Root so how do I capture the events like window close/ logout etc?

thanks
dheeraj

You can still use your own subclass of Application with Vaadin 7 if you want to do something in e.g. Application.close().

There are two different ways of doing this:

  • Put init parameters for both application and root in your web.xml
  • Put only application in web.xml and override Application.getRootClassName to return the name of your Root class

Events when individual Roots are closed is also planned and will probably be included in alpha3 which is scheduled for release in a couple of months.