Class BindingValidationStatus<TARGET>

    • Constructor Detail

      • BindingValidationStatus

        @Deprecated
        public BindingValidationStatus​(Binder.Binding<?,​TARGET> source,
                                       ValidationResult result)
        Deprecated.
        Creates a new validation status for the given binding and validation result.
        Parameters:
        source - the source binding
        result - the result of the validation
    • Method Detail

      • createUnresolvedStatus

        public static <TARGET> BindingValidationStatus<TARGET> createUnresolvedStatus​(Binder.Binding<?,​TARGET> source)
        Convenience method for creating a BindingValidationStatus.Status.UNRESOLVED validation status for the given binding.
        Type Parameters:
        TARGET - the target data type of the binding for which the validation status was reset
        Parameters:
        source - the source binding
        Returns:
        unresolved validation status
      • isError

        public boolean isError()
        Gets whether the validation failed or not.
        Returns:
        true if validation failed, false if validation passed
      • getMessage

        public java.util.Optional<java.lang.String> getMessage()
        Gets error validation message if status is BindingValidationStatus.Status.ERROR.
        Returns:
        an optional validation error status or an empty optional if status is not an error
      • getValidationResults

        public java.util.List<ValidationResult> getValidationResults()
        Gets all the validation results related to this binding validation status.
        Returns:
        list of validation results
        Since:
        8.2
      • getBinding

        public Binder.Binding<?,​TARGET> getBinding()
        Gets the source binding of the validation status.
        Returns:
        the source binding
      • getField

        public HasValue<?> getField()
        Gets the bound field for this status.
        Returns:
        the field