Hi-

I am trying to set up an error page in MyFaces.  I have a PhaseListener that is invoked before the Render Phase.  If the PhaseListener finds any errors, it sends the user to the error page.  However, this is not working because the action that executes before the Render Phase is a redirect.  Even though my PhaseListener has the correct logic to invoke NavigationHandler.handleNavigation() and then call FacesConfix.renderResponse(), the user is going to the error page.

For example, the user is on the UpdateDocument page and they hit the save button.  The navigation rule says that the user should next go to the DocumentList page with a redirect.  However, after the InvokeApplication phase and before the Render phase, my PhaseListener commits the transaction and gets a Transaction Rollback error.  At this point, my PhaseListener calls the NavigationHandler to "override" the redirect to DocumentList with a command to go to the Error page.  But it doesn't work - the user always goes back to the DocumentList and the error is swallowed.

As far as I can tell, this is because in NavigationHandlerImpl line 131 (MyFaces 1.1.3), externalContext.redirect() is called.  Somehow, even though I later call the NavigationHandler again to go to the error page, it doesn't happen.

Does anybody know how I can override the original redirect and force the user to the error page?

Thanks,

Adam Brod

Product Development Team

Disclaimer: This electronic mail and any attachments are confidential and may be privileged. If you are not the intended recipient, please notify the sender immediately by replying to this email, and destroy all copies of this email and any attachments. Thank you.


Reply via email to