<div class="gmail_quote">On Tue, Jun 2, 2009 at 12:33 PM, Drew Kutcharian <span dir="ltr"><<a href="mailto:drew@venarc.com" target="_blank">drew@venarc.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: Verdana; font-size: 10pt; color: rgb(0, 0, 0);">Ian,<br><br>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.<br>
</div></div></blockquote><div><br>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.<br><br>I'd like to note, however, that you can do exactly what you described with this bit of configuration:<br>
<br><exception class="javax.faces.application.ViewExpiredException"><br> <redirect view-id="#{org.jboss.seam.handledException.viewId}"><br> <message severity="warn">Your session has timed out. You were redirected to the current page with a new session.</message><br>
</redirect><br></exception><br><br>-Dan<br clear="all"></div></div><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br><br><a href="http://mojavelinux.com" target="_blank">http://mojavelinux.com</a><br>
<a href="http://mojavelinux.com/seaminaction" target="_blank">http://mojavelinux.com/seaminaction</a><br><a href="http://in.relation.to/Bloggers/Dan" target="_blank">http://in.relation.to/Bloggers/Dan</a><br><br>NOTE: While I make a strong effort to keep up with my email on a daily<br>
basis, personal or other work matters can sometimes keep me away<br>from my email. If you contact me, but don't hear back for more than a week,<br>it is very likely that I am excessively backlogged or the message was<br>
caught in the spam filters. Please don't hesitate to resend a message if<br>you feel that it did not reach my attention.<br>