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

public interface Field
extends Component, BufferedValidatable, Property, Property.ValueChangeNotifier, Property.ValueChangeListener, Property.Editor, Component.Focusable

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)

Sets the Caption.

Specified by:
setCaption in interface Component

Parameters:
caption -

getDescription

String getDescription()

setDescription

void setDescription(String caption)

Sets the Description.

Parameters:
caption -

isRequired

boolean isRequired()

Is this field required. Required fields must filled by the user.

Returns:
true if the field is required,otherwise false.
Since:
3.1

setRequired

void setRequired(boolean required)

Sets the field required. Required fields must filled by the user.

Parameters:
required - Is the field required.
Since:
3.1

setRequiredError

void setRequiredError(String requiredMessage)

Sets the error message to be displayed if a required field is empty.

Parameters:
requiredMessage - Error message.
Since:
5.2.6

getRequiredError

String getRequiredError()

Gets the error message that is to be displayed if a required field is empty.

Returns:
Error message.
Since:
5.2.6