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.WrapperHasContextHelp.ContextHelpIconClickEventAUTO_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, setDatasourceaddValueChangeListener, clear, getEmptyValue, getValue, isEmpty, removeValueChangeListener, setValueaddStyleName, 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, unwrapCompositiongetValueSource, setValueSourceisEditable, isEditableWithParent, setEditablegetFrame, setFrameisValid, isValidateOnCommit, validategetIcon, setIcon, setIconFromSetgetContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledisCaptionAsHtml, setCaptionAsHtmlgetCaption, setCaptiongetDescription, setDescriptionisDescriptionAsHtml, setDescriptionAsHtmlboolean 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()