public interface Field<V> extends DatasourceComponent<V>, HasValueSource<V>, Component.HasCaption, HasValue<V>, Component.Editable, Component.BelongToFrame, Validatable, Component.HasIcon, HasContextHelp, HasHtmlCaption, HasHtmlDescription
Modifier and Type | Interface and Description |
---|---|
static interface |
Field.Validator<T>
Deprecated.
Use typed
Consumer instead. |
HasValue.ValueChangeEvent<V>
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.OptionsStyleProvider, Component.Wrapper
HasContextHelp.ContextHelpIconClickEvent
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE, UNITS_PERCENTAGE, UNITS_PIXELS
Modifier and Type | Method and Description |
---|---|
void |
addValidator(java.util.function.Consumer<? super V> validator)
Add validator instance.
|
default void |
addValidators(java.util.function.Consumer<? super V>... validators) |
java.lang.String |
getRequiredMessage() |
java.util.Collection<java.util.function.Consumer<V>> |
getValidators() |
boolean |
isRequired() |
void |
removeValidator(java.util.function.Consumer<V> validator) |
void |
setRequired(boolean required) |
void |
setRequiredMessage(java.lang.String msg)
A message that will be displayed to user if the field is required but has null value
|
getDatasource, getMetaProperty, getMetaPropertyPath, setDatasource
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, removeValueChangeListener, setValue
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getHeightUnits, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, getWidthUnits, isEnabled, isEnabledItself, isEnabledRecursive, isResponsive, isVisible, isVisibleItself, isVisibleRecursive, removeStyleName, requestFocus, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition
getValueSource, setValueSource
isEditable, isEditableWithParent, setEditable
getFrame, setFrame
isValid, isValidateOnCommit, validate
getIcon, setIcon, setIconFromSet
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabled
isCaptionAsHtml, setCaptionAsHtml
getCaption, setCaption
getDescription, setDescription
isDescriptionAsHtml, setDescriptionAsHtml
boolean isRequired()
void setRequired(boolean required)
java.lang.String getRequiredMessage()
void setRequiredMessage(java.lang.String msg)
void addValidator(java.util.function.Consumer<? super V> validator)
ValidationException
this exception must be thrown by the validator if the value is not valid.void removeValidator(java.util.function.Consumer<V> validator)
default void addValidators(java.util.function.Consumer<? super V>... validators)
java.util.Collection<java.util.function.Consumer<V>> getValidators()