When leaving the JSF application in browser for some time (ie, till session expires), I am unable to successfully run any actionlistener methods as well. All the functionality on my pages thus becomes inactive & on any action I get exception:
javax.faces.application.ViewExpiredException: View could not be restored
I'm then required to relogin into the application thereby creating a new session to get the fresh pages with fresh view state in session, which then work. This doesn't lead to a very good user experience. I am wanting to avoid this situation altogether such that my pages are always functional any time they are used after idle periods. Currently, my state saving is, as expected, set to SERVER (I don't want to change this).
How can I make the pages always functional ? Since not all functionality lead to navigation to other pages, I guess faces-redirect=true isn't a solution for me.
Whenever the viewstate is lost, can't it create a new fresh view state on the fly without compromising with user experience !?
JSF2.1, Primefaces 3.1 Tomcat 7