Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cache Problem in Vaadin

Tags:

vaadin

I have a sample application with three steps as below

Enter user details -> Personal details -> Finished

When I click on a link it will invoke my vaadin application. The problem is once my three step process is finished and when I tried to again click on the my vaadin link it still shows the final wizard page 'Finished'

(Browser cache needs to be cleared or browser needs to be restarted if I want to see again first page i.e. Enter user details wizard page)

like image 352
Kalyan Raju Avatar asked Dec 29 '22 02:12

Kalyan Raju


1 Answers

Since Vaadin keeps the session in memory, your application is not reset until it sees a new browser session (i.e. cache cleared or browser restarted). One more way to clear the session during development is to att ?restartApplication to your application's URL. This will also clear the application state.

So with this in mind it is clear that if you like the Vaadin application state to be reset during normal usage of it, you have to programmatically make sure the internal logic works in a way that does this. E.g. call a self-defined reset() method for your first view.

Make sure you don't confuse this session based state of an application, with a page-state which resets an applicaton every time you press reload or open a link again without a new browser session being created.

Section in Book of Vaadin about this: http://vaadin.com/book/-/page/architecture.server-side.html

like image 107
Jonas Granvik Avatar answered Dec 31 '22 14:12

Jonas Granvik