public class TableTextFieldWrapper extends com.vaadin.ui.HorizontalLayout implements com.vaadin.ui.Field<String>
TextField
so it is laid out correctly inside a
editable Table. Because by default a TextField
inside an editable
table does not show any error indicator on a failed validation. The Vertical-
or HorizontalLayout does show an error indicator, so we wrap the layout
around the text field.com.vaadin.ui.Field.ValueChangeEvent
com.vaadin.data.Buffered.SourceException
com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyException, com.vaadin.data.Property.ReadOnlyStatusChangeEvent, com.vaadin.data.Property.ReadOnlyStatusChangeListener, com.vaadin.data.Property.ReadOnlyStatusChangeNotifier, com.vaadin.data.Property.Transactional<T>, com.vaadin.data.Property.ValueChangeListener, com.vaadin.data.Property.ValueChangeNotifier, com.vaadin.data.Property.Viewer
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.server.ClientConnector.AttachEvent, com.vaadin.server.ClientConnector.AttachListener, com.vaadin.server.ClientConnector.ConnectorErrorEvent, com.vaadin.server.ClientConnector.DetachEvent, com.vaadin.server.ClientConnector.DetachListener
com.vaadin.server.Sizeable.Unit
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.SpacingHandler
com.vaadin.ui.HasComponents.ComponentAttachDetachNotifier, com.vaadin.ui.HasComponents.ComponentAttachEvent, com.vaadin.ui.HasComponents.ComponentAttachListener, com.vaadin.ui.HasComponents.ComponentDetachEvent, com.vaadin.ui.HasComponents.ComponentDetachListener
Constructor and Description |
---|
TableTextFieldWrapper(com.vaadin.ui.TextField field) |
Modifier and Type | Method and Description |
---|---|
void |
addListener(com.vaadin.data.Property.ValueChangeListener listener) |
void |
addValidator(com.vaadin.data.Validator validator) |
void |
addValueChangeListener(com.vaadin.data.Property.ValueChangeListener listener) |
void |
commit() |
void |
discard() |
void |
focus() |
com.vaadin.server.ErrorMessage |
getComponentError() |
Object |
getData() |
com.vaadin.data.Property |
getPropertyDataSource() |
String |
getRequiredError() |
int |
getTabIndex() |
Class<String> |
getType() |
Collection<com.vaadin.data.Validator> |
getValidators() |
String |
getValue() |
boolean |
isBuffered() |
boolean |
isInvalidAllowed() |
boolean |
isInvalidCommitted() |
boolean |
isModified() |
boolean |
isRequired() |
boolean |
isValid() |
void |
removeAllValidators() |
void |
removeListener(com.vaadin.data.Property.ValueChangeListener listener) |
void |
removeValidator(com.vaadin.data.Validator validator) |
void |
removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener listener) |
void |
setBuffered(boolean readThrough) |
void |
setComponentError(com.vaadin.server.ErrorMessage componentError) |
void |
setData(Object data) |
void |
setInvalidAllowed(boolean invalidValueAllowed) |
void |
setInvalidCommitted(boolean isCommitted) |
void |
setPropertyDataSource(com.vaadin.data.Property newDataSource) |
void |
setRequired(boolean required) |
void |
setRequiredError(String requiredMessage) |
void |
setTabIndex(int tabIndex) |
void |
setValue(String newValue) |
void |
validate() |
void |
valueChange(com.vaadin.data.Property.ValueChangeEvent event) |
addComponent, addComponent, addComponentAsFirst, addLayoutClickListener, addListener, getComponent, getComponentAlignment, getComponentCount, getComponentIndex, getDefaultComponentAlignment, getExpandRatio, getMargin, getState, getState, isSpacing, iterator, removeComponent, removeLayoutClickListener, removeListener, replaceComponent, setComponentAlignment, setDefaultComponentAlignment, setExpandRatio, setMargin, setMargin, setSpacing
addComponentAttachListener, addComponentDetachListener, addComponents, addListener, addListener, fireComponentAttachEvent, fireComponentDetachEvent, getComponentIterator, moveComponentsFrom, removeAllComponents, removeComponentAttachListener, removeComponentDetachListener, removeListener, removeListener, setHeight, setWidth
addListener, addShortcutListener, addStyleName, attach, beforeClientResponse, detach, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getDebugId, getDescription, getErrorMessage, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isReadOnly, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setDebugId, setDescription, setEnabled, setHeight, setIcon, setId, setImmediate, setLocale, setParent, setPrimaryStyleName, setReadOnly, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hasListeners, isAttached, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, addStyleName, attach, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
getHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setSizeFull, setSizeUndefined, setWidth, setWidth
addComponents, addListener, addListener, getComponentIterator, moveComponentsFrom, removeAllComponents, removeListener, removeListener
forEach, spliterator
public TableTextFieldWrapper(com.vaadin.ui.TextField field)
public boolean isInvalidCommitted()
isInvalidCommitted
in interface com.vaadin.data.BufferedValidatable
public void setInvalidCommitted(boolean isCommitted)
setInvalidCommitted
in interface com.vaadin.data.BufferedValidatable
public void commit() throws com.vaadin.data.Buffered.SourceException, com.vaadin.data.Validator.InvalidValueException
commit
in interface com.vaadin.data.Buffered
com.vaadin.data.Buffered.SourceException
com.vaadin.data.Validator.InvalidValueException
public void discard() throws com.vaadin.data.Buffered.SourceException
discard
in interface com.vaadin.data.Buffered
com.vaadin.data.Buffered.SourceException
public boolean isBuffered()
isBuffered
in interface com.vaadin.data.Buffered
public void setBuffered(boolean readThrough) throws com.vaadin.data.Buffered.SourceException
setBuffered
in interface com.vaadin.data.Buffered
com.vaadin.data.Buffered.SourceException
public boolean isModified()
isModified
in interface com.vaadin.data.Buffered
public void addValidator(com.vaadin.data.Validator validator)
addValidator
in interface com.vaadin.data.Validatable
public void removeValidator(com.vaadin.data.Validator validator)
removeValidator
in interface com.vaadin.data.Validatable
public void removeAllValidators()
removeAllValidators
in interface com.vaadin.data.Validatable
public Collection<com.vaadin.data.Validator> getValidators()
getValidators
in interface com.vaadin.data.Validatable
public boolean isValid()
isValid
in interface com.vaadin.data.Validatable
public void validate() throws com.vaadin.data.Validator.InvalidValueException
validate
in interface com.vaadin.data.Validatable
com.vaadin.data.Validator.InvalidValueException
public boolean isInvalidAllowed()
isInvalidAllowed
in interface com.vaadin.data.Validatable
public void setInvalidAllowed(boolean invalidValueAllowed) throws UnsupportedOperationException
setInvalidAllowed
in interface com.vaadin.data.Validatable
UnsupportedOperationException
public String getValue()
getValue
in interface com.vaadin.data.Property<String>
public void setValue(String newValue) throws com.vaadin.data.Property.ReadOnlyException
setValue
in interface com.vaadin.data.Property<String>
com.vaadin.data.Property.ReadOnlyException
public Class<String> getType()
getType
in interface com.vaadin.data.Property<String>
public void addListener(com.vaadin.data.Property.ValueChangeListener listener)
addListener
in interface com.vaadin.data.Property.ValueChangeNotifier
public void addValueChangeListener(com.vaadin.data.Property.ValueChangeListener listener)
addValueChangeListener
in interface com.vaadin.data.Property.ValueChangeNotifier
public void removeListener(com.vaadin.data.Property.ValueChangeListener listener)
removeListener
in interface com.vaadin.data.Property.ValueChangeNotifier
public void removeValueChangeListener(com.vaadin.data.Property.ValueChangeListener listener)
removeValueChangeListener
in interface com.vaadin.data.Property.ValueChangeNotifier
public void valueChange(com.vaadin.data.Property.ValueChangeEvent event)
valueChange
in interface com.vaadin.data.Property.ValueChangeListener
public void setPropertyDataSource(com.vaadin.data.Property newDataSource)
setPropertyDataSource
in interface com.vaadin.data.Property.Viewer
public com.vaadin.data.Property getPropertyDataSource()
getPropertyDataSource
in interface com.vaadin.data.Property.Viewer
public int getTabIndex()
getTabIndex
in interface com.vaadin.ui.Component.Focusable
public void setTabIndex(int tabIndex)
setTabIndex
in interface com.vaadin.ui.Component.Focusable
public boolean isRequired()
isRequired
in interface com.vaadin.ui.Field<String>
public void setRequired(boolean required)
setRequired
in interface com.vaadin.ui.Field<String>
public void setRequiredError(String requiredMessage)
setRequiredError
in interface com.vaadin.ui.Field<String>
public String getRequiredError()
getRequiredError
in interface com.vaadin.ui.Field<String>
public void focus()
focus
in interface com.vaadin.ui.Component.Focusable
focus
in class com.vaadin.ui.AbstractComponent
public void setData(Object data)
setData
in class com.vaadin.ui.AbstractComponent
public Object getData()
getData
in class com.vaadin.ui.AbstractComponent
public void setComponentError(com.vaadin.server.ErrorMessage componentError)
setComponentError
in class com.vaadin.ui.AbstractComponent
public com.vaadin.server.ErrorMessage getComponentError()
getComponentError
in class com.vaadin.ui.AbstractComponent
Copyright © 2017. All rights reserved.