Page refresh and VAADIN

hi all,

i have just created simple VAADIN project in eclipse using the vaadin plugin for eclipse, compiled it and ran it to see all is fine and it was.

after that i added a ServletContextListener and configured the web.xml to link this to the servlet. then i added log code in the ServletContextListener’s contextInitialized() and in my subclassed vaadin Application’s init() method to see how the app behaves.

on logging on to the web app the log code is output as expected from the ServletContextListener() and Application.init().

then when i refreshed the page i was expecting the Application.init() to be reloaded but it did not if i am wrong could anyone explain me what happens when the page refresh is requested in the web browser please?

many thanks!

In Vaadin6, The application state is stored between page refreshes. This means that if your do a refresh (or navigate away/back) you get the same exact application class instance. There are workarounds that change this behaviour, but this is how it is designed. Vaadin 7, on the other hand, does not store UI state over page refreshes by default. There is an annotation that you can use to make it behave like Vaadin6, though.