users@javaserverfaces.java.net

Re: ViewExpiredException on postback

From: <jacob_at_hookom.net>
Date: Fri, 23 Sep 2005 22:14:01 +0200

Basically that exception occurs when the ResponseStateManager recognizes
the request as a postback (FacesRequest) and tries to recover the
VIEW_STATE, but can't.

Are you using state-saving server or client?

-- Jacob

Ryan Dewell <ryan_at_dewell.org> wrote on 09/23/2005, 09:57:35 PM:
> 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
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: users-help_at_javaserverfaces.dev.java.net