V
- Value typepublic interface ValidatableInput<V> extends Input<V>, Validatable
Input
component with validation support using Validator
s.Input.InputFieldPropertyRenderer<T,F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component>, Input.InputPropertyRenderer<T>
ValueHolder.MaySupportValueChangeMode, ValueHolder.ValueChangeEvent<V>, ValueHolder.ValueChangeListener<V>
Modifier and Type | Method and Description |
---|---|
com.vaadin.shared.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 <F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component,T> |
from(F field)
Create a
ValidatableInput component type from given HasValue component. |
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
Validator s, every time the Input value
changes. |
void |
setValidateOnValueChange(boolean validateOnValueChange)
Sets whether to validate the value, using registered
Validator s, every time the Input value
changes. |
void |
setValidationStatusHandler(ValidationStatusHandler validationStatusHandler)
Set the
ValidationStatusHandler to use to track validation status changes. |
focus, from, from, from, from, getValueChangeMode, getValueChangeTimeout, isReadOnly, isRequired, isValueChangeModeSupported, setReadOnly, setRequired, setValueChangeMode, setValueChangeTimeout
addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, getValueIfPresent, isEmpty, setValue
getValue
getComponent
isValid, validate
com.vaadin.shared.Registration addValidator(com.holonplatform.core.Validator<V> validator)
Validator
to validate the input value.validator
- The validator to add (not null)void setValidateOnValueChange(boolean validateOnValueChange)
Validator
s, every time the Input
value
changes.validateOnValueChange
- true
to perform value validation every time the Input
value
changes, false
if notboolean isValidateOnValueChange()
Validator
s, 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.ValidationStatusHandler
static <T> ValidatableInput<T> from(Input<T> input)
ValidatableInput
from given Input
instance.from
in interface Input<V>
T
- Value typeinput
- The Input
instance (not null)ValidatableInput
component which wraps the given input
static <F extends com.vaadin.data.HasValue<T> & com.vaadin.ui.Component,T> ValidatableInput<T> from(F field)
ValidatableInput
component type from given HasValue
component.from
in interface Input<V>
T
- Value typeF
- HasValue
component typefield
- The field instance (not null)ValidatableInput
component which wraps the given field
static <T> ValidatableInputBuilder<T,ValidatableInput<T>> builder(Input<T> input)
ValidatableInput
from given Input
.T
- Value typeinput
- Concrete input component (not null)ValidatableInput
builderCopyright © 2018 The Holon Platform. All rights reserved.