MyFaces Core
  1. MyFaces Core
  2. MYFACES-3790

DISABLE_BEAN_VALIDATOR vs. DISABLE_DEFAULT_BEAN_VALIDATOR

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.2.0
    • Fix Version/s: None
    • Component/s: JSR-344
    • Labels:
      None

      Description

      During the configuring of a new project I found these two params in JSF spec 2.2:

      1)
      javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR

      If this param is set, and calling toLowerCase().equals("true") on a String representation of its value returns true, the runtime must not automatically add the validator with validator-id equal to the value of the symbolic constant javax.faces.validator.VALIDATOR_ID to the list of default validators. Setting this parameter to true will have the effect of disabling the automatic installation of Bean Validation to every input component in every view in the application, though manual installation is still possible.

      2)
      javax.faces.validator.DISABLE_BEAN_VALIDATOR

      In environments that include Bean Validation, the following additional actions must be taken at startup time. If the javax.faces.validator.DISABLE_BEAN_VALIDATOR <context-param> exists and its value is true, the following step must be skipped:
      The runtime must guarantee that the validator id javax.faces.Bean is included in the result from a call to
      Application.getDefaultValidatorInfo() (see Section 7.1.12.1 “Default Validator Ids”), regardless of any
      configuration found in the application configuration resources or via the @FacesValidator annotation.

      I don't see a difference really. I guess, this is a error in the spec.

      But I didn't found the DISABLE_BEAN_VALIDATOR in Myfaces source code - should we implement it nevertheless ?

        Activity

        Hide
        Leonardo Uribe added a comment -

        It seems to be a bug in the spec, so I filled:

        https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1231

        I think it is not necessary to implement the other name, because both MyFaces and Mojarra uses javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR

        Show
        Leonardo Uribe added a comment - It seems to be a bug in the spec, so I filled: https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1231 I think it is not necessary to implement the other name, because both MyFaces and Mojarra uses javax.faces.validator.DISABLE_DEFAULT_BEAN_VALIDATOR

          People

          • Assignee:
            Unassigned
            Reporter:
            Martin Kočí
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development