Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3053 Improve error reporting and logging
  3. MYFACES-3199

Handling AbortProcessingException is unconsistent

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0.9, 2.0.13, 2.1.3, 2.1.7
    • General
    • None
    • myface core trunk

    Description

      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;

      Attachments

        1. UIViewRoot.patch
          4 kB
          Martin Kočí
        2. MYFACES-3199-v2.patch
          5 kB
          Martin Kočí

        Issue Links

          Activity

            People

              lu4242 Leonardo Uribe
              markoc50 Martin Kočí
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: