|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vaadin.server.AbstractClientConnector com.vaadin.ui.AbstractComponent com.vaadin.ui.AbstractField<T> com.vaadin.ui.CustomField<T> info.magnolia.ui.form.field.AbstractCustomMultiField<D,T>
T
- Property Type linked to this Field.D
- FieldDefinition Implementation used by the implemented Field.public abstract class AbstractCustomMultiField<D extends FieldDefinition,T>
Abstract implementation of CustomField
used for multi fields components.
It expose generic methods allowing to:
- Build a Field
based on a ConfiguredFieldDefinition
.
- Retrieve the list of Fields contained into the main component
- Override Validate and get Error Message in order to include these call to the embedded Fields.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.vaadin.ui.AbstractField |
---|
com.vaadin.ui.AbstractField.FocusShortcut, com.vaadin.ui.AbstractField.ReadOnlyStatusChangeEvent |
Nested classes/interfaces inherited from interface com.vaadin.ui.HasComponents |
---|
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 |
Nested classes/interfaces inherited from interface com.vaadin.ui.Component |
---|
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener |
Nested classes/interfaces inherited from interface com.vaadin.server.ClientConnector |
---|
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 |
Nested classes/interfaces inherited from interface com.vaadin.server.Sizeable |
---|
com.vaadin.server.Sizeable.Unit |
Nested classes/interfaces inherited from interface com.vaadin.ui.Field |
---|
com.vaadin.ui.Field.ValueChangeEvent |
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered |
---|
com.vaadin.data.Buffered.SourceException |
Nested classes/interfaces inherited from interface com.vaadin.data.Property |
---|
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 |
Field Summary | |
---|---|
protected info.magnolia.objectfactory.ComponentProvider |
componentProvider
|
protected com.vaadin.data.Property.ValueChangeListener |
datasourceListener
Listener used to update fields based on DataSources changes. For example if the field support i18n, when the language is changed, the individual field of the custom field have to be updated. |
protected D |
definition
|
protected FieldFactoryFactory |
fieldFactoryFactory
|
protected info.magnolia.cms.i18n.I18nContentSupport |
i18nContentSupport
|
protected com.vaadin.data.Item |
relatedFieldItem
|
protected com.vaadin.data.Property.ValueChangeListener |
selectionListener
Listener used to update the Data source property. |
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 |
Constructor Summary | |
---|---|
protected |
AbstractCustomMultiField(D definition,
FieldFactoryFactory fieldFactoryFactory,
info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport,
info.magnolia.objectfactory.ComponentProvider componentProvider,
com.vaadin.data.Item relatedFieldItem)
|
Method Summary | |
---|---|
protected com.vaadin.ui.Field<?> |
createLocalField(ConfiguredFieldDefinition fieldDefinition,
com.vaadin.data.Item item,
boolean setCaptionToNull)
Create a new Field based on a ConfiguredFieldDefinition . |
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. Implemented logic should: - remove all component from the root component. |
protected boolean |
isEmpty()
|
boolean |
isValid()
Validate all fields from the root container. |
Methods inherited from class com.vaadin.ui.CustomField |
---|
attach, getContent, initContent, iterator, setHeight, setWidth |
Methods inherited from class com.vaadin.ui.AbstractField |
---|
addListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, beforeClientResponse, commit, detach, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getState, getState, getTabIndex, getType, getValidators, getValue, isBuffered, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, setValue, shouldHideErrors, toString, validate, validate, valueChange |
Methods inherited from class com.vaadin.ui.AbstractComponent |
---|
addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isConnectorEnabled, isEnabled, isImmediate, isVisible, removeListener, removeShortcutListener, removeStyleName, setCaption, setComponentError, setData, setDebugId, setDescription, setEnabled, setHeight, setIcon, setId, setImmediate, setParent, setPrimaryStyleName, setSizeFull, setSizeUndefined, setStyleName, setVisible, setWidth |
Methods inherited from class com.vaadin.server.AbstractClientConnector |
---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.vaadin.ui.Component |
---|
addListener, addStyleName, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setId, setParent, setPrimaryStyleName, setReadOnly, setStyleName, setVisible |
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, setSizeFull, setSizeUndefined, setWidth |
Methods inherited from interface com.vaadin.event.Action.ShortcutNotifier |
---|
addShortcutListener, removeShortcutListener |
Field Detail |
---|
protected final FieldFactoryFactory fieldFactoryFactory
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.data.Property.ValueChangeListener selectionListener
protected com.vaadin.data.Property.ValueChangeListener datasourceListener
Constructor Detail |
---|
protected AbstractCustomMultiField(D definition, FieldFactoryFactory fieldFactoryFactory, info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport, info.magnolia.objectfactory.ComponentProvider componentProvider, com.vaadin.data.Item relatedFieldItem)
Method Detail |
---|
protected abstract void initFields(T fieldValues)
protected void initFields()
protected com.vaadin.ui.Field<?> createLocalField(ConfiguredFieldDefinition fieldDefinition, com.vaadin.data.Item item, boolean setCaptionToNull)
Field
based on a ConfiguredFieldDefinition
.
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>
protected boolean isEmpty()
isEmpty
in class com.vaadin.ui.AbstractField<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |