[seam-dev] build before restore

Dan Allen dan.j.allen at gmail.com
Fri Jun 12 19:54:11 EDT 2009


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

> Ian,
>
> 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>
   </redirect>
</exception>

-Dan

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

http://mojavelinux.com
http://mojavelinux.com/seaminaction
http://in.relation.to/Bloggers/Dan

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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/seam-dev/attachments/20090612/4c3d8b8e/attachment.html 


More information about the seam-dev mailing list