com.vaadin.ui.
Interface Field
All Superinterfaces:
Buffered, BufferedValidatable, Component, Component.Focusable, EventListener, Paintable, Property, Property.Editor, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer, Serializable, Sizeable, Validatable, VariableOwner
All Known Implementing Classes:
AbstractField, AbstractSelect, AbstractTextField, Button, CheckBox, ComboBox, DateField, Form, InlineDateField, ListSelect, NativeButton, NativeSelect, OptionGroup, PasswordField, PopupDateField, ProgressIndicator, RichTextArea, Select, Slider, Table, TextArea, TextField, Tree, TreeTable, TwinColSelect
- extends Component, BufferedValidatable, Property, Property.ValueChangeNotifier, Property.ValueChangeListener, Property.Editor, Component.Focusable
public interface Field
Author:
Vaadin Ltd.
Nested Class Summary | |
---|---|
static class |
Field.ValueChangeEvent
An Event object specifying the Field whose value has been
changed. |
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered |
---|
Buffered.SourceException |
Nested classes/interfaces inherited from interface com.vaadin.data.Property |
---|
Property.ConversionException, Property.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
Method Summary | |
---|---|
String |
getDescription()
|
String |
getRequiredError()
Gets the error message that is to be displayed if a required field is empty. |
boolean |
isRequired()
Is this field required. |
void |
setCaption(String caption)
Sets the Caption. |
void |
setDescription(String caption)
Sets the Description. |
void |
setRequired(boolean required)
Sets the field required. |
void |
setRequiredError(String requiredMessage)
Sets the error message to be displayed if a required field is empty. |
Methods inherited from interface com.vaadin.data.BufferedValidatable |
---|
isInvalidCommitted, setInvalidCommitted |
Methods inherited from interface com.vaadin.data.Buffered |
---|
commit, discard, isModified, isReadThrough, isWriteThrough, setReadThrough, setWriteThrough |
Methods inherited from interface com.vaadin.data.Validatable |
---|
addValidator, getValidators, isInvalidAllowed, isValid, removeValidator, setInvalidAllowed, validate |
Methods inherited from interface com.vaadin.data.Property |
---|
getType, getValue, isReadOnly, setReadOnly, setValue, toString |
Methods inherited from interface com.vaadin.data.Property.ValueChangeNotifier |
---|
addListener, removeListener |
Methods inherited from interface com.vaadin.data.Property.ValueChangeListener |
---|
valueChange |
Methods inherited from interface com.vaadin.data.Property.Viewer |
---|
getPropertyDataSource, setPropertyDataSource |
Methods inherited from interface com.vaadin.ui.Component.Focusable |
---|
focus, getTabIndex, setTabIndex |
Method Detail |
---|
setCaption
void setCaption(String caption)
- Specified by:
setCaption
in interfaceComponent
- Parameters:
caption
-
Sets the Caption.
getDescription
String getDescription()
setDescription
void setDescription(String caption)
- Parameters:
caption
-
Sets the Description.
isRequired
boolean isRequired()
- Returns:
true
if the field is required,otherwisefalse
.- Since:
- 3.1
Is this field required. Required fields must filled by the user.
setRequired
void setRequired(boolean required)
- Parameters:
required
- Is the field required.- Since:
- 3.1
Sets the field required. Required fields must filled by the user.
setRequiredError
void setRequiredError(String requiredMessage)
- Parameters:
requiredMessage
- Error message.- Since:
- 5.2.6
Sets the error message to be displayed if a required field is empty.
getRequiredError
String getRequiredError()
- Returns:
- Error message.
- Since:
- 5.2.6
Gets the error message that is to be displayed if a required field is empty.