V - Value typepublic interface ValidatableInput<V> extends Input<V>, Validatable
Input component with validation support using Validators.Input.InputFieldPropertyRenderer<T>, Input.InputPropertyRenderer<T>ValueHolder.ValueChangeEvent<V>, ValueHolder.ValueChangeListener<V>| Modifier and Type | Method and Description |
|---|---|
Registration |
addValidator(com.holonplatform.core.Validator<V> validator)
Adds a
Validator to validate the input value. |
static <T> ValidatableInputBuilder<T,ValidatableInput<T>> |
builder(Input<T> input)
Get a fluent builder to create and setup a
ValidatableInput from given Input. |
static <T> ValidatableInput<T> |
from(com.vaadin.ui.Field<T> field)
Create a
ValidatableInput component type from given Field instance. |
static <T> ValidatableInput<T> |
from(com.vaadin.ui.Field<T> field,
boolean inheritValidators)
Create a
ValidatableInput component type from given Field instance. |
static <T> ValidatableInput<T> |
from(Input<T> input)
Create a
ValidatableInput from given Input instance. |
Optional<ValidationStatusHandler> |
getValidationStatusHandler()
Get the
ValidationStatusHandler to use to track validation status changes, if available. |
boolean |
isValidateOnValueChange()
Gets whether to validate the value, using registered
Validators, every time the Input value
changes. |
void |
setValidateOnValueChange(boolean validateOnValueChange)
Sets whether to validate the value, using registered
Validators, every time the Input value
changes. |
void |
setValidationStatusHandler(ValidationStatusHandler validationStatusHandler)
Set the
ValidationStatusHandler to use to track validation status changes. |
focus, isReadOnly, isRequired, setReadOnly, setRequiredaddValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, setValuegetComponent, getValueisValid, validateRegistration addValidator(com.holonplatform.core.Validator<V> validator)
Validator to validate the input value.validator - The validator to add (not null)void setValidateOnValueChange(boolean validateOnValueChange)
Validators, every time the Input value
changes.validateOnValueChange - true to perform value validation every time the Input value
changes, false if notboolean isValidateOnValueChange()
Validators, every time the Input value
changes.
Default is true.
true if the value validation must be performed every time the Input value changesvoid setValidationStatusHandler(ValidationStatusHandler validationStatusHandler)
ValidationStatusHandler to use to track validation status changes.validationStatusHandler - the ValidationStatusHandler to setOptional<ValidationStatusHandler> getValidationStatusHandler()
ValidationStatusHandler to use to track validation status changes, if available.ValidationStatusHandlerstatic <T> ValidatableInput<T> from(Input<T> input)
ValidatableInput from given Input instance.T - Value typeinput - The Input instance (not null)ValidatableInput component which wraps the given inputstatic <T> ValidatableInput<T> from(com.vaadin.ui.Field<T> field)
ValidatableInput component type from given Field instance.
Any Field validator will be inherited from the returned ValidatableInput instance.
from in interface Input<V>T - Value typefield - The field instance (not null)ValidatableInput component which wraps the given fieldstatic <T> ValidatableInput<T> from(com.vaadin.ui.Field<T> field, boolean inheritValidators)
ValidatableInput component type from given Field instance.T - Value typefield - The field instance (not null)inheritValidators - Whether to inherit Field validators, if anyValidatableInput component which wraps the given fieldstatic <T> ValidatableInputBuilder<T,ValidatableInput<T>> builder(Input<T> input)
ValidatableInput from given Input.T - Value typeinput - Concrete input component (not null)ValidatableInput builderCopyright © 2019 The Holon Platform. All rights reserved.