T
- Property Type linked to this Field.D
- FieldDefinition Implementation used by the implemented Field.public abstract class AbstractCustomMultiField<D extends FieldDefinition,T>
extends com.vaadin.ui.CustomField<T>
CustomField
used for multi fields components.Field
based on a ConfiguredFieldDefinition
. com.vaadin.ui.AbstractField.FocusShortcut, com.vaadin.ui.AbstractField.ReadOnlyStatusChangeEvent
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
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.Field.ValueChangeEvent
com.vaadin.data.Buffered.SourceException
com.vaadin.data.Property.Editor, com.vaadin.data.Property.ReadOnlyException, 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
Modifier and Type | Field and Description |
---|---|
protected info.magnolia.objectfactory.ComponentProvider |
componentProvider |
protected D |
definition |
protected FieldFactoryFactory |
fieldFactoryFactory |
protected info.magnolia.cms.i18n.I18nContentSupport |
i18nContentSupport
Deprecated.
since 5.3.5 (actually unused way before that). Besides, fields should use i18nAuthoringSupport for internationalization.
|
protected com.vaadin.data.Item |
relatedFieldItem |
protected com.vaadin.ui.AbstractOrderedLayout |
root |
protected com.vaadin.data.Property.ValueChangeListener |
selectionListener
Listener used to update the Data source property.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractCustomMultiField(D definition,
FieldFactoryFactory fieldFactoryFactory,
info.magnolia.objectfactory.ComponentProvider componentProvider,
com.vaadin.data.Item relatedFieldItem,
I18NAuthoringSupport i18nAuthoringSupport) |
protected |
AbstractCustomMultiField(D definition,
FieldFactoryFactory fieldFactoryFactory,
info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport,
info.magnolia.objectfactory.ComponentProvider componentProvider,
com.vaadin.data.Item relatedFieldItem)
Deprecated.
since 5.3.5 removing i18nContentSupport dependency (actually unused way before that). Besides, fields should use i18nAuthoringSupport for internationalization.
|
Modifier and Type | Method and Description |
---|---|
protected com.vaadin.ui.Field<?> |
createLocalField(FieldDefinition fieldDefinition,
com.vaadin.data.Property<?> property,
boolean setCaptionToNull)
Create a new
Field based on a FieldDefinition . |
protected int |
findPropertyId(com.vaadin.data.Item item,
com.vaadin.data.Property<?> property)
Helper method to find propertyId for a given property within item datasource.
|
com.vaadin.server.ErrorMessage |
getErrorMessage()
Get the error message.
|
protected List<com.vaadin.ui.AbstractField<T>> |
getFields(com.vaadin.ui.HasComponents root,
boolean onlyValid)
Utility method that return a list of Fields embedded into a root custom field.
|
protected void |
initFields() |
protected abstract void |
initFields(T fieldValues)
Initialize the fields based on the newValues.
|
boolean |
isEmpty() |
boolean |
isValid()
Validate all fields from the root container.
|
void |
setLocale(Locale locale)
Handle
I18NAuthoringSupport.i18nize(HasComponents, Locale) events in order to refresh the field and display the new property. |
attach, getContent, initContent, iterator, setHeight, setWidth
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, clear, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getCustomAttributes, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getState, getTabIndex, getType, getValidators, getValue, isBuffered, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValidationVisible, readDesign, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, setValue, shouldHideErrors, toString, validate, validate, valueChange, writeDesign
addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isImmediate, isOrHasAncestor, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setHeightUndefined, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth, setWidthUndefined
addAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getListeners, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, markAsDirty, markAsDirtyRecursive, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addListener, addStyleName, 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
addAttachListener, addDetachListener, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
protected final FieldFactoryFactory fieldFactoryFactory
@Deprecated protected final info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport
protected final info.magnolia.objectfactory.ComponentProvider componentProvider
protected final D extends FieldDefinition definition
protected final com.vaadin.data.Item relatedFieldItem
protected com.vaadin.ui.AbstractOrderedLayout root
protected com.vaadin.data.Property.ValueChangeListener selectionListener
protected AbstractCustomMultiField(D definition, FieldFactoryFactory fieldFactoryFactory, info.magnolia.objectfactory.ComponentProvider componentProvider, com.vaadin.data.Item relatedFieldItem, I18NAuthoringSupport i18nAuthoringSupport)
@Deprecated protected AbstractCustomMultiField(D definition, FieldFactoryFactory fieldFactoryFactory, info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport, info.magnolia.objectfactory.ComponentProvider componentProvider, com.vaadin.data.Item relatedFieldItem)
protected abstract void initFields(T fieldValues)
public void setLocale(Locale locale)
I18NAuthoringSupport.i18nize(HasComponents, Locale)
events in order to refresh the field setLocale
in class com.vaadin.ui.AbstractField<T>
protected void initFields()
protected int findPropertyId(com.vaadin.data.Item item, com.vaadin.data.Property<?> property)
protected com.vaadin.ui.Field<?> createLocalField(FieldDefinition fieldDefinition, com.vaadin.data.Property<?> property, boolean setCaptionToNull)
Field
based on a FieldDefinition
.protected List<com.vaadin.ui.AbstractField<T>> getFields(com.vaadin.ui.HasComponents root, boolean onlyValid)
root
- onlyValid
- if set to true, return only the isValid() fields.public boolean isValid()
isValid
in interface com.vaadin.data.Validatable
isValid
in class com.vaadin.ui.AbstractField<T>
public com.vaadin.server.ErrorMessage getErrorMessage()
getErrorMessage
in class com.vaadin.ui.AbstractField<T>
Copyright © 2015 Magnolia International Ltd.. All rights reserved.