users@javaserverfaces.java.net

ViewExpiredException on postback

From: Ryan Dewell <ryan_at_dewell.org>
Date: Fri, 23 Sep 2005 12:57:35 -0700

Hello, I'm using JSF 1.2 via the latest build of Facelets.

I'm using a very light ViewHandler implementation over the top of the
Facelets view handler implementation (double decorator, I guess).
The purpose of my ViewHandler is to provide some simple / extra
mapping functionality not solvable by prefix or extension mapping.

Everything works fine on the GET. I override createView to call
super.createView with the path of the "real" file. I override
getActionUrl to point to my custom path.

The ViewExpiredException comes up in the postback. restoreView is
called on my ViewHandler and I pass the same "real" file path that I
originally passed to "createView" back to super.restoreView.

FYI: I'm emailing this list instead of Facelets because their impl
simply calls super.restoreView as well.

So, I'm hoping that someone with more knowledge than I can tell me
what causes a ViewExpiredException? I can see that it has something
to do with the StateManager, but from there I get lost in the source
code. I don't feel like I can solve the problem or come up with a
workaround until I get a better understanding of the conditions that
lead up to ViewExpiredException in the first place...

In short, I'm ultimately passing the exact same "path" to both
createView and restoreView, so I can't understand why createView
works fine, and restoreView fails on the postback.

Any help is appreciated!

Best regards,

Ryan