users@javaserverfaces.java.net

Re: ViewExpiredException on postback

From: Ryan Dewell <ryan_at_dewell.org>
Date: Sun, 25 Sep 2005 19:25:16 -0700

Very interesting. Alright, that gives me a few ideas on what to try
next.

Ryan


On Sep 25, 2005, at 6:22 PM, Jacob Hookom wrote:

> Hey Ryan,
>
> I was just checking in some portlet support issues for Facelets and
> was going to start looking again at the problem. Another option
> would be to put a filter up front on your application?
>
> The heart of it is that you are rendering /view.xml, but at that
> time of rendering, the state is saved, probably bound to /
> view.xml. So I believe the issues you are seeing are concentrated
> around the fact that the UIViewRoot needs to be both /nextup/view
> and /view.xml at the same time. Between everything, I don't think
> there's a proper way to catch it.
>
> Really, the view in the error message that you want restored is "/
> view.xml", not "/nextup/view". Because "/view.xml" was the view
> rendered and stored, that's the view that should've been stored.
> Now, the next step I would take in making sure you have all of your
> bases covered is to decorate the statemanager and intercept the
> view ids being passed around there.
>
> -- Jacob
>
>
>
>
> Ryan Dewell wrote:
>
>
>> Jacob, thanks for spending the time you have thus far looking at
>> this problem. Is there a solution in sight here as far as you
>> know? I thought that was one of the main reasons for subclassing
>> ViewHandler -- to provide different URL mapping strategies. Part
>> of the problem is that the ViewExpiredException is terribly non-
>> specific, offering little in the way to suggest how I might "fix"
>> my strategy here. All I want it to do is process the restoreView
>> for the same view ID that was successfully createView'd and
>> displayed only moments ago! :) It seems so simple. Surely
>> "expired" is misnomer as not much time has passed at all.
>>
>> If all else fails, do you have any other suggestions on how to
>> provide my own URL->view mapping strategy that will avoid this
>> ViewExpiredException? In my case the postfix/prefix functionality
>> provided by JSF just isn't powerful enough.
>>
>> Ryan
>>