Class ValidateAllOrNone

    • Field Detail

      • COMPONENT_TYPE

        public static final String COMPONENT_TYPE
        The component type, which is "org.omnifaces.component.validator.ValidateAllOrNone".
        See Also:
        Constant Field Values
    • Constructor Detail

      • ValidateAllOrNone

        public ValidateAllOrNone()
    • Method Detail

      • validateValues

        public boolean validateValues​(FacesContext context,
                                      List<UIInput> inputs,
                                      List<Object> values)
        Validate if all or none is filled out.
        Parameters:
        context - The faces context to work with.
        inputs - The input components whose values are to be validated.
        values - The values of the input components to be validated, in the same order as the components.
        Returns:
        true if validation is successful, otherwise false (and thus show the message).
      • shouldInvalidateInput

        protected boolean shouldInvalidateInput​(FacesContext context,
                                                UIInput input,
                                                Object value)
        In an invalidating case, invalidate only those inputs which have an empty value.
        Overrides:
        shouldInvalidateInput in class ValidateMultipleFields
        Parameters:
        context - The faces context to work with.
        input - The input component which may need to be invalidated.
        value - The value of the input component.
        Returns:
        Whether in in an invalidating case the given input component should be marked invalid