|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Field<T>
Field interface is implemented by all classes (field components) that have a
value that the user can change through the user interface.
Field components are built upon the framework defined in the Field interface
and the com.vaadin.AbstractField
base class.
The Field interface inherits the Component
superinterface and also the com.vaadin.ui.Property
interface to have
a value for the field.
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.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeEvent, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.Viewer |
Nested classes/interfaces inherited from interface com.vaadin.ui.Component |
---|
Component.ErrorEvent, Component.Event, Component.Focusable, Component.Listener |
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector |
---|
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener |
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
---|
Sizeable.Unit |
Field Summary |
---|
Fields inherited from interface com.vaadin.server.Sizeable |
---|
SIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS |
Method Summary | |
---|---|
void |
clear()
Clears the value of the field. |
java.lang.String |
getRequiredError()
Gets the error message that is to be displayed if a required field is empty. |
boolean |
isEmpty()
Is the field empty? In general, "empty" state is same as null. |
boolean |
isRequired()
Is this field required. |
void |
setRequired(boolean required)
Sets the field required. |
void |
setRequiredError(java.lang.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, isBuffered, isModified, setBuffered |
Methods inherited from interface com.vaadin.data.Validatable |
---|
addValidator, getValidators, isInvalidAllowed, isValid, removeAllValidators, removeValidator, setInvalidAllowed, validate |
Methods inherited from interface com.vaadin.data.Property |
---|
getType, getValue, isReadOnly, setReadOnly, setValue |
Methods inherited from interface com.vaadin.data.Property.ValueChangeNotifier |
---|
addListener, addValueChangeListener, removeListener, removeValueChangeListener |
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 |
Methods inherited from interface com.vaadin.ui.Component |
---|
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, readDesign, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible, writeDesign |
Methods inherited from interface com.vaadin.server.ClientConnector |
---|
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler |
Methods inherited from interface com.vaadin.shared.Connector |
---|
getConnectorId |
Methods inherited from interface com.vaadin.server.Sizeable |
---|
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefined |
Method Detail |
---|
boolean isRequired()
true
if the field is required,otherwise
false
.void setRequired(boolean required)
required
- Is the field required.void setRequiredError(java.lang.String requiredMessage)
requiredMessage
- Error message.java.lang.String getRequiredError()
boolean isEmpty()
void clear()
The field value is typically reset to the initial value of the field.
Calling isEmpty()
on a cleared field must always returns true.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |