[
https://issues.apache.org/jira/browse/MYFACES-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13058504#comment-13058504
]
Martin Kočí commented on MYFACES-3199:
--------------------------------------
Classes with AbortProcessingException usage:
# javax.faces.application.Application.publishEvent(FacesContext, Class<?
extends SystemEvent>, Object)
# javax.faces.event.MethodExpressionActionListener.processAction(ActionEvent)
# javax.faces.event.MethodExpressionValueChangeListener
# UIComponentBase.broadcast(FacesEvent)
# UIInput.broadcast(FacesEvent)
#
org.apache.myfaces.view.facelets.tag.jsf.core.ActionListenerHandler.LazyActionListener.processAction(ActionEvent)
# org.apache.myfaces.application.ActionListenerImpl.processAction(ActionEvent)
# org.apache.myfaces.application.ApplicationImpl.publishEvent(FacesContext,
Class<? extends SystemEvent>, Class<?>, Object)
#
org.apache.myfaces.view.facelets.tag.jsf.core.PhaseListenerHandler.LazyPhaseListener.getInstance()
#
org.apache.myfaces.taglib.core.PhaseListenerTag.BindingPhaseListener.getPhaseListnerInstance(ValueExpression,
ValueExpression)
#
org.apache.myfaces.view.facelets.tag.jsf.core.ValueChangeListenerHandler.LazyValueChangeListener.processValueChange(ValueChangeEvent)
rethrowing in code is inconsistent, catch block sometimes contains:
catch (Exception e) (or catch (FacesException ex) or catch (ELException e))
throw new AbortProcessingException("....", e);
> 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čí
>
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira