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

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

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


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.


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

Posted by "Jakob Korherr (JIRA)" <de...@myfaces.apache.org>.
    [ 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.