MyFaces Extensions Validator
  1. MyFaces Extensions Validator
  2. EXTVAL-105

AbstractValidationInterceptor: call to processAfterValidation() even if object was not validated

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.3, 2.0.3, 1.1.3
    • Fix Version/s: 1.2.4, 2.0.4, 1.1.4
    • Component/s: Core
    • Labels:
      None

      Description

      Is that correct: in case the uiComponent should not be processed and in consequence is not validated, the processing after validation is executed!?

      org.apache.myfaces.extensions.validator.core.interceptor.AbstractValidationInterceptor:

      try
      {

          1. if(processComponent(uiComponent)) ###
            {
            convertedObject = transformValueForValidation(convertedObject);

      if(validateValue(convertedObject) &&
      processBeforeValidation(facesContext, uiComponent, convertedObject))

      { processValidation(facesContext, uiComponent, convertedObject); }

      }
      }
      catch (ValidatorException e)
      {
      try

      { //ViolationSeverityInterpreter might decide that it isn't an exception ExtValUtils.tryToThrowValidatorExceptionForComponent(uiComponent, e.getFacesMessage(), e); }

      catch (ValidatorException finalException)

      { throw new ConverterException(e.getFacesMessage(), e); }

      }
      finally

      { ### processAfterValidation(facesContext, uiComponent, convertedObject); ### resetRendererInterceptorProperties(uiComponent); }

        Activity

        Gerhard Petracek made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gerhard Petracek made changes -
        Affects Version/s 1.1.3 [ 12313875 ]
        Affects Version/s 1.2.3 [ 12313876 ]
        Gerhard Petracek made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.2.4-SNAPSHOT [ 12314835 ]
        Fix Version/s 2.0.4-SNAPSHOT [ 12314836 ]
        Fix Version/s 1.1.4-SNAPSHOT [ 12314834 ]
        Resolution Fixed [ 1 ]
        Tom M. made changes -
        Field Original Value New Value
        Description Is that correct: in case the uiComponent should not be processed and in consequence is not validated, the processing after validation is executed!?

        org.apache.myfaces.extensions.validator.core.interceptor.AbstractValidationInterceptor:

          try
                {
                    *if(processComponent(uiComponent))*
                    {
                        convertedObject = transformValueForValidation(convertedObject);

                        if(validateValue(convertedObject) &&
                                processBeforeValidation(facesContext, uiComponent, convertedObject))
                        {
                            processValidation(facesContext, uiComponent, convertedObject);
                        }
                    }
                }
                catch (ValidatorException e)
                {
                    try
                    {
                        //ViolationSeverityInterpreter might decide that it isn't an exception
                        ExtValUtils.tryToThrowValidatorExceptionForComponent(uiComponent, e.getFacesMessage(), e);
                    }
                    catch (ValidatorException finalException)
                    {
                        throw new ConverterException(e.getFacesMessage(), e);
                    }
                }
                finally
                {
                    *processAfterValidation(facesContext, uiComponent, convertedObject);*
                    resetRendererInterceptorProperties(uiComponent);
                }
                
        Is that correct: in case the uiComponent should not be processed and in consequence is not validated, the processing after validation is executed!?

        org.apache.myfaces.extensions.validator.core.interceptor.AbstractValidationInterceptor:

          try
                {
                    ### if(processComponent(uiComponent)) ###
                    {
                        convertedObject = transformValueForValidation(convertedObject);

                        if(validateValue(convertedObject) &&
                                processBeforeValidation(facesContext, uiComponent, convertedObject))
                        {
                            processValidation(facesContext, uiComponent, convertedObject);
                        }
                    }
                }
                catch (ValidatorException e)
                {
                    try
                    {
                        //ViolationSeverityInterpreter might decide that it isn't an exception
                        ExtValUtils.tryToThrowValidatorExceptionForComponent(uiComponent, e.getFacesMessage(), e);
                    }
                    catch (ValidatorException finalException)
                    {
                        throw new ConverterException(e.getFacesMessage(), e);
                    }
                }
                finally
                {
                    ### processAfterValidation(facesContext, uiComponent, convertedObject); ###
                    resetRendererInterceptorProperties(uiComponent);
                }
                
        Tom M. created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Tom M.
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development