Class BeanValidator

  • All Implemented Interfaces:
    PartialStateHolder, StateHolder, Validator, EventListener

    @JSFValidator(name="f:validateBean",
                  bodyContent="empty")
    @JSFJspProperty(name="binding",
                    returnType="jakarta.faces.validator.BeanValidator",
                    longDesc="A ValueExpression that evaluates to a BeanValidator.")
    public class BeanValidator
    extends Object
    implements Validator, PartialStateHolder

    BeanValidator is a Validator that doesn't do any validation itself, but delegates validation logic to Bean Validation.

    Since:
    2.0
    • Field Detail

      • VALIDATOR_ID

        public static final String VALIDATOR_ID
        Converter ID, as defined by the JSF 2.0 specification.
        See Also:
        Constant Field Values
      • MESSAGE_ID

        public static final String MESSAGE_ID
        The message ID for this Validator in the message bundles.
        See Also:
        Constant Field Values
      • DISABLE_DEFAULT_BEAN_VALIDATOR_PARAM_NAME

        @JSFWebConfigParam(defaultValue="true",
                           expectedValues="true, false",
                           since="2.0",
                           group="validation")
        public static final String DISABLE_DEFAULT_BEAN_VALIDATOR_PARAM_NAME
        If this init parameter is present, no Bean Validators should be added to an UIInput by default. Explicitly adding a BeanValidator to an UIInput is possible though.
        See Also:
        Constant Field Values
      • VALIDATOR_FACTORY_KEY

        public static final String VALIDATOR_FACTORY_KEY
        The key in the ServletContext where the Bean Validation Factory can be found. In a managed Java EE 6 environment, the container initializes the ValidatorFactory and stores it in the ServletContext under this key. If not present, the manually instantiated ValidatorFactory is stored in the ServletContext under this key for caching purposes.
        See Also:
        Constant Field Values
      • VALIDATION_GROUPS_DELIMITER

        public static final String VALIDATION_GROUPS_DELIMITER
        This is used as a separator so multiple validation groups can be specified in one String.
        See Also:
        Constant Field Values
      • EMPTY_VALIDATION_GROUPS_PATTERN

        public static final String EMPTY_VALIDATION_GROUPS_PATTERN
        This regular expression is used to match for empty validation groups. Currently, a string containing only whitespace is classified as empty.
        See Also:
        Constant Field Values
      • ENABLE_VALIDATE_WHOLE_BEAN_PARAM_NAME

        @JSFWebConfigParam(since="2.3",
                           defaultValue="false",
                           expectedValues="true, false",
                           group="validation")
        public static final String ENABLE_VALIDATE_WHOLE_BEAN_PARAM_NAME
        Enable f:validateWholeBean use.
        See Also:
        Constant Field Values
    • Constructor Detail

      • BeanValidator

        public BeanValidator()