Class ValidateAllOrNone

    • Field Detail


        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.
        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.
        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.
        shouldInvalidateInput in class ValidateMultipleFields
        context - The faces context to work with.
        input - The input component which may need to be invalidated.
        value - The value of the input component.
        Whether in in an invalidating case the given input component should be marked invalid