On Tue, Jun 2, 2009 at 12:33 PM, Drew Kutcharian <drew@venarc.com> wrote:

I had the same issue. What I ended up doing was creating/registering a custom Seam ExceptionHandler to catch ViewExpiredExceptions and redirecting to the page. The good thing is that the ViewExpiredException contains the View Id of the view that the user was trying to access, so you can just do a GET redirect to the page. The user will loose their inputed data, but at least the page will render correctly.

Thanks Drew! I'm guessing that this is a fairly common situation that we should put on the FAQ and perhaps even add as a feature of Seam.

I'd like to note, however, that you can do exactly what you described with this bit of configuration:

<exception class="javax.faces.application.ViewExpiredException">
   <redirect view-id="#{org.jboss.seam.handledException.viewId}">
      <message severity="warn">Your session has timed out. You were redirected to the current page with a new session.</message>


Dan Allen
Senior Software Engineer, Red Hat | Author of Seam in Action


NOTE: While I make a strong effort to keep up with my email on a daily
basis, personal or other work matters can sometimes keep me away
from my email. If you contact me, but don't hear back for more than a week,
it is very likely that I am excessively backlogged or the message was
caught in the spam filters.  Please don't hesitate to resend a message if
you feel that it did not reach my attention.