-
1. Re: View state could't be restored - reload page?
ilya_shaikovsky Apr 12, 2007 6:36 AM (in response to holicy)If this occurs only sometimes - may be session expiration?
-
2. Re: View state could't be restored - reload page?
holicy Apr 12, 2007 9:22 AM (in response to holicy)> If this occurs only sometimes - may be session expiration?
I find out if I browsed some page and then left a while, it ALWAYS happened
when I browsed the page again (do something to trigger a event to send an ajax request).
Originally, I thought it is my fault.
The same thing happened in RichFaces demo pages, e.g.
http://livedemo.exadel.com/richfaces-demo/richfaces/tree.jsf
So it is normal? -
3. Re: View state could't be restored - reload page?
sergeysmirnov Apr 12, 2007 11:18 AM (in response to holicy)If session is expired, the alert appears when the page post Ajax request. It is normal. Developer can overwrite the default behavior and provides the new one.
Usually, this message might appear during the development time, when you redeploy the application, but try to send an Ajax request from the page loaded from the previous session. It is also normal.
It is not normal is alert appear on the same application until the session is really expired -
4. Re: View state could't be restored - reload page?
holicy Apr 13, 2007 4:52 AM (in response to holicy)If session is expired, the alert appears when the page post Ajax request.
It is normal. Developer can overwrite the default behavior and provides the new one.
Even if I overwrite the A4J.AJAX.onExpired handler, session expiration is still unpreventable.
So how to keep a session alive? -
5. Re: View state could't be restored - reload page?
sergeysmirnov Apr 13, 2007 1:01 PM (in response to holicy)One way is have a a4j:poll component that send empty request to the server periodically. So, if you have a 20 min. session, send the request each 15 min.
If much better to surround a4j:poll with a4j:region to avoid correlation with other activities on the page