[seam-issues] [JBoss JIRA] (SEAMFACES-168) Error page navigation after Seam Catch

Bernard Labno (JIRA) jira-events at lists.jboss.org
Wed Feb 22 06:52:36 EST 2012


    [ https://issues.jboss.org/browse/SEAMFACES-168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12669882#comment-12669882 ] 

Bernard Labno commented on SEAMFACES-168:
-----------------------------------------

I suggest adding @ErrorView(Throwable cause, String viewId) annotation and use it in @ViewConfig annotated enum i.e.:
ViewConfig
public interface PagesConfig {
// -------------------------- ENUMERATIONS --------------------------

    static enum Pages {
        @AccessDenied @RestrictAtPhase(PhaseIdType.RESTORE_VIEW) @ViewPattern("/resources/components/*")
        COMPONENTS,
        @FacesRedirect @ViewPattern("/view/*") @AccessDeniedView("/view/denied.xhtml") @LoginView("/view/login.xhtml") @ErrorViews({@ErrorView(cause=NPE.class,"/view/error.xhtml"), at ErrorView(cause=EntityNotFoundException.class,"/view/404.xhtml")})
        ALL
    }
}

                
> Error page navigation after Seam Catch
> --------------------------------------
>
>                 Key: SEAMFACES-168
>                 URL: https://issues.jboss.org/browse/SEAMFACES-168
>             Project: Seam Faces
>          Issue Type: Feature Request
>          Components: Conversations
>    Affects Versions: 3.0.1
>         Environment: JBoss AS6, Mojarra 2.1
>            Reporter: Andrew Wheeler
>             Fix For: 3.1.0.Tracking
>
>
> It would be nice to annotate a Seam Catch handler with an error page view that is restored after the exception has been handled. This should tidy (destroy) any active conversation as the view probably can't be restored. It could also mark the event as handled (some default behaviour) if it hasn't been handled by the exception handler method.
> E.g:
> @ErrorPage("error")
> public void noConversationHandler(@Handles CaughtException<NonexistentConversationException> event) {
>    messages.info("The view you were editing has expired.");
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list