myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (Commented) (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Commented] (MYFACES-3199) Handling AbortProcessingException is unconsistent
Date Tue, 13 Mar 2012 19:46:41 GMT

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

Leonardo Uribe commented on MYFACES-3199:
-----------------------------------------

Yes, sounds reasonable unify in this part, so all APE cases can be handled as expected in
custom ExceptionHandler implementations. I updated the code to include the changes proposed
on the second patch. Thanks for the fix.
                
> Handling AbortProcessingException is unconsistent
> -------------------------------------------------
>
>                 Key: MYFACES-3199
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3199
>             Project: MyFaces Core
>          Issue Type: Sub-task
>          Components: General
>         Environment: myface core trunk
>            Reporter: Martin Kočí
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.9, 2.0.13, 2.1.3, 2.1.7
>
>         Attachments: MYFACES-3199-v2.patch, UIViewRoot.patch
>
>
> UIViewRoot:
>  try  {
>     source.broadcast(event);
>  }
>             catch (AbortProcessingException e)
>             {
>                 ExceptionQueuedEventContext exceptionContext 
>                         = new ExceptionQueuedEventContext(context, e, source, context.getCurrentPhaseId());
>                 context.getApplication().publishEvent(context, ExceptionQueuedEvent.class,
exceptionContext);
>                 
>                 // Abortion
>                 return false;
> }
> Problem 1: 
> <h:inputText  valueChangeListener="#{bean.processValueChange}">
> MethodExpressionValueChangeListener wraps all exceptions to AbortProcessingException
and therefore exception is queued
> Problem 2: 
>             <h:inputText  >
>                 <f:valueChangeListener binding="#{bean}" />
>             </h:inputText>
> ValueChangeListenerHandler does not wrap exception to AbortProcessingException and therefore
 exception is not queued in this block (but it is queued from phase executor but without component
info)
> Problem 3: JSF spec 2.1 : 
> "Clarification made: throwing an AbortProcessingException tells an implementation that
no further broadcast of the
> current event occurs. Does not affect future events." 
> But I think that code in UIViewRoot makes opposite:  // Abortion  return false;

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

       

Mime
View raw message