You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Chris Hane <ch...@gmail.com> on 2007/06/29 21:54:44 UTC

[Trinidad] Refresh View after HTTPSession Timeout

I have a generic search screen (standard input form) that displays the 
results on the "next" page using a <tr:table>.

If the user hits the refresh button any time prior to the HTTPSession 
timeout, then the form is resubmitted and the search generated again (could 
display different results if the underlying data has been updated - which 
is what we want to happen).

If the user leaves (for a time greater than the HTTPSession timeout) the 
results screen, comes back and hits the refresh button after the timeout, 
the "Find" screen is displayed again.

I am using Trinidad 1.0 Myfaces 1.1, Jboss 4.0.x, Seam 1.2p1 with client 
side state saving.

One of the first errors in the log is:

2007-06-29 15:35:17,593 ERROR [STDERR] Jun 29, 2007 3:35:17 PM 
org.apache.myfaces.trinidadinternal.application.StateManagerImpl 
restoreView SEVERE: Could not find saved view state for token 7cad43c0

Which is why I'm assuming it is the HTTPSession timeout.

Is there anything I can do so that the "refresh" will re-run the search and 
not show the Find screen?

Thanks,
Chris....

Re: [Trinidad] Refresh View after HTTPSession Timeout

Posted by Chris Hane <ch...@gmail.com>.
Scott - thanks for the pointer.

I actually ended up doing something very similar by using a feature of Seam 
that in essence let's me do this without any extra coding on my part. 
There is a feature called "Page Actions" that let's me associate parameters 
(and a whole bunch of other stuff) with a view.  Whenever the view is 
called, it will then marshal the parameters (which in my case are the 
search criteria and offset) into the Find service and execute.  It will 
basically treat it as a GET request which means I don't have to worry about 
  any timeout limits....

Thanks again for your suggestion,
Chris....

Scott O'Bryan wrote:
> Hey Chris,  it's kind of hokey, but if your url contains all the data 
> you need you might be able to create a bunch of managed properties on a 
> managed bean and bind them to the request parameter mappings.  You could 
> then use that managed bean to populate the values in your components.  :)
> 
> Scott
> 
> Chris Hane wrote:
>> I have a generic search screen (standard input form) that displays the 
>> results on the "next" page using a <tr:table>.
>>
>> If the user hits the refresh button any time prior to the HTTPSession 
>> timeout, then the form is resubmitted and the search generated again 
>> (could display different results if the underlying data has been 
>> updated - which is what we want to happen).
>>
>> If the user leaves (for a time greater than the HTTPSession timeout) 
>> the results screen, comes back and hits the refresh button after the 
>> timeout, the "Find" screen is displayed again.
>>
>> I am using Trinidad 1.0 Myfaces 1.1, Jboss 4.0.x, Seam 1.2p1 with 
>> client side state saving.
>>
>> One of the first errors in the log is:
>>
>> 2007-06-29 15:35:17,593 ERROR [STDERR] Jun 29, 2007 3:35:17 PM 
>> org.apache.myfaces.trinidadinternal.application.StateManagerImpl 
>> restoreView SEVERE: Could not find saved view state for token 7cad43c0
>>
>> Which is why I'm assuming it is the HTTPSession timeout.
>>
>> Is there anything I can do so that the "refresh" will re-run the 
>> search and not show the Find screen?
>>
>> Thanks,
>> Chris....
>>
> 
> 

Re: [Trinidad] Refresh View after HTTPSession Timeout

Posted by Scott O'Bryan <da...@gmail.com>.
Hey Chris,  it's kind of hokey, but if your url contains all the data 
you need you might be able to create a bunch of managed properties on a 
managed bean and bind them to the request parameter mappings.  You could 
then use that managed bean to populate the values in your components.  :)

Scott

Chris Hane wrote:
> I have a generic search screen (standard input form) that displays the 
> results on the "next" page using a <tr:table>.
>
> If the user hits the refresh button any time prior to the HTTPSession 
> timeout, then the form is resubmitted and the search generated again 
> (could display different results if the underlying data has been 
> updated - which is what we want to happen).
>
> If the user leaves (for a time greater than the HTTPSession timeout) 
> the results screen, comes back and hits the refresh button after the 
> timeout, the "Find" screen is displayed again.
>
> I am using Trinidad 1.0 Myfaces 1.1, Jboss 4.0.x, Seam 1.2p1 with 
> client side state saving.
>
> One of the first errors in the log is:
>
> 2007-06-29 15:35:17,593 ERROR [STDERR] Jun 29, 2007 3:35:17 PM 
> org.apache.myfaces.trinidadinternal.application.StateManagerImpl 
> restoreView SEVERE: Could not find saved view state for token 7cad43c0
>
> Which is why I'm assuming it is the HTTPSession timeout.
>
> Is there anything I can do so that the "refresh" will re-run the 
> search and not show the Find screen?
>
> Thanks,
> Chris....
>