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

ExtVal should call FacesContext.validationFailed() in case of validation failure

    Details

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

      Description

      In JSF 2.0 a new method was introduced --> javax.faces.context.FacesContext.validationFailed(): "Sets a flag which indicates that a conversion or validation error occurred while processing the inputs. Inputs consist of either page parameters or form bindings. This flag can be read using

      {@link #isValidationFailed}

      ."

      It seems to me that ExtVal 2.0 r4m3 does not make use of this leaving me to check if messages are available.

      Could you add this behaviour?

        Activity

        Hide
        Gerhard Petracek added a comment -

        EditableValueHolder#setValid(false) is already called in the bv module. that leads to the same effect.
        you are right - we should move the existing interceptor to the core of extval.
        anyway, in your special case it should work already.

        Show
        Gerhard Petracek added a comment - EditableValueHolder#setValid(false) is already called in the bv module. that leads to the same effect. you are right - we should move the existing interceptor to the core of extval. anyway, in your special case it should work already.
        Hide
        Rudy De Busscher added a comment -

        For the moment, you can create an implementation of ValidationExceptionInterceptor that calls the facesContext.validaitonFailed method. That way you can already start using the isValidationFailed check method.

        The interceptor can be registered by a call to ExtValContext.getContext().addValidationExceptionInterceptor() in a ExtValStartupListener.

        Show
        Rudy De Busscher added a comment - For the moment, you can create an implementation of ValidationExceptionInterceptor that calls the facesContext.validaitonFailed method. That way you can already start using the isValidationFailed check method. The interceptor can be registered by a call to ExtValContext.getContext().addValidationExceptionInterceptor() in a ExtValStartupListener.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development