You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org> on 2009/12/02 10:30:21 UTC

[jira] Commented: (MYFACES-2441) Make _ErrorPageWriter public to allow re-use of default functionality

    [ https://issues.apache.org/jira/browse/MYFACES-2441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784731#action_12784731 ] 

Jakob Korherr commented on MYFACES-2441:
----------------------------------------

I'm afraid the _ErrorPageWriter cannot be exposed, because the class is in package javax.faces.webapp and it is not part of the JSF spec and thus MyFaces would not pass the TCK, if it was public.
We could copy it to org.apache.myfaces.webapp and rename it to DefaultErrorPageWriter, but that would lead to code duplication.

> Make _ErrorPageWriter public to allow re-use of default functionality
> ---------------------------------------------------------------------
>
>                 Key: MYFACES-2441
>                 URL: https://issues.apache.org/jira/browse/MYFACES-2441
>             Project: MyFaces Core
>          Issue Type: Improvement
>    Affects Versions: 1.2.8
>            Reporter: Caius Gran
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Using context parameter "org.apache.myfaces.ERROR_HANDLER", you can override default
> error handling functionality. In my case, handling ViewExpiredException's is particularly useful,
> but otherwise the default is fine.
> I couldn't do the obvious, because the default error handler is hidden:
>     public void handleException(FacesContext fc, Exception ex) throws ServletException, IOException
>     {
>         if (ex instanceof ViewExpiredException)
>         {
>             // redirect
>         }
>         else
>         {
>             _ErrorPageWriter.handleException(fc, ex);
>         }
>     }
> Could the default error handler be exposed and perhaps renamed to something like "DefaultErrorPageWriter"?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.