This content has been marked as final.
Show 1 reply
-
1. Re: Conditional redirect - ViewExpiredException
lvdberg Oct 7, 2010 10:15 AM (in response to sykwitit)Hi,
The basic definition is:
<exception class="javax.faces.application.ViewExpiredException" log="false"> <redirect view-id="##### see next #####"> <message severity="WARN">#{messages['view_expired']}</message> </redirect> </exception>
As stated in the mentioned thread: using
#{facesContext.externalContext.requestServletPath}#{facesContext.externalContext.requestPathInfo}
Will redirect after the exception to the page where the error occured
The view-id contains EL, so you could enter some conditional logic like:
- {condition ? step 1 : step 2}
Meaning you can still read bean content and use it as input for your view-id logic.
Leo