D
- definition typepublic class SwitchableFieldFactory<D extends SwitchableFieldDefinition> extends AbstractFieldFactory<D,com.vaadin.v7.data.util.PropertysetItem>
SwitchableField
based on a SwitchableFieldDefinition
.
The SwitchableField
has two components:
- A select section configured based on the options list of the definition
- A field section configured based on the fields list of the definition
The link between select and fields is based on the association of:
- The String property defined into the value property of the definition (value = date)
and
- The Field name defined into the Fields set (Date field named date).
initializeProperty
definition, field, item
Constructor and Description |
---|
SwitchableFieldFactory(D definition,
com.vaadin.v7.data.Item relatedFieldItem,
FieldFactoryFactory fieldFactoryFactory,
info.magnolia.objectfactory.ComponentProvider componentProvider,
I18NAuthoringSupport i18nAuthoringSupport)
Deprecated.
|
SwitchableFieldFactory(D definition,
com.vaadin.v7.data.Item relatedFieldItem,
FieldFactoryFactory fieldFactoryFactory,
info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport,
info.magnolia.objectfactory.ComponentProvider componentProvider)
Deprecated.
since 5.3.5 removing i18nContentSupport dependency (actually unused way before that). Besides, fields should use i18nAuthoringSupport for internationalization.
|
SwitchableFieldFactory(D definition,
com.vaadin.v7.data.Item relatedFieldItem,
UiContext uiContext,
I18NAuthoringSupport i18nAuthoringSupport,
FieldFactoryFactory fieldFactoryFactory,
info.magnolia.objectfactory.ComponentProvider componentProvider) |
Modifier and Type | Method and Description |
---|---|
protected com.vaadin.v7.ui.Field<com.vaadin.v7.data.util.PropertysetItem> |
createFieldComponent()
Implemented by subclasses to create and initialize the Vaadin Field instance to use.
|
protected ConfiguredFieldDefinition |
createSelectFieldDefinition() |
protected Transformer<?> |
initializeTransformer(Class<? extends Transformer<?>> transformerClass)
Create a new Instance of
Transformer . |
createDefaultValue, createField, createTypedValue, getComponentProvider, getConfiguredDefaultValue, getDefaultFieldType, getDefinitionType, getFieldDefinition, getFieldType, getI18nBasename, getLocale, getView, initializeConverter, initializeProperty, isMessageKey, setComponentProvider, setFieldValidatorFactoryFactory, setI18nContentSupport, setLocale, setPropertyDataSourceAndDefaultValue, setPropertyDataSourceDefaultValue
getMessage, getMessages, getParent, setParent
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMessages, getParent, setParent
@Inject public SwitchableFieldFactory(D definition, com.vaadin.v7.data.Item relatedFieldItem, UiContext uiContext, I18NAuthoringSupport i18nAuthoringSupport, FieldFactoryFactory fieldFactoryFactory, info.magnolia.objectfactory.ComponentProvider componentProvider)
@Deprecated public SwitchableFieldFactory(D definition, com.vaadin.v7.data.Item relatedFieldItem, FieldFactoryFactory fieldFactoryFactory, info.magnolia.objectfactory.ComponentProvider componentProvider, I18NAuthoringSupport i18nAuthoringSupport)
SwitchableFieldFactory(SwitchableFieldDefinition, Item, UiContext, I18NAuthoringSupport, FieldFactoryFactory, ComponentProvider)
instead.@Deprecated public SwitchableFieldFactory(D definition, com.vaadin.v7.data.Item relatedFieldItem, FieldFactoryFactory fieldFactoryFactory, info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport, info.magnolia.objectfactory.ComponentProvider componentProvider)
protected com.vaadin.v7.ui.Field<com.vaadin.v7.data.util.PropertysetItem> createFieldComponent()
AbstractFieldFactory
createFieldComponent
in class AbstractFieldFactory<D extends SwitchableFieldDefinition,com.vaadin.v7.data.util.PropertysetItem>
protected Transformer<?> initializeTransformer(Class<? extends Transformer<?>> transformerClass)
Transformer
.initializeTransformer
in class AbstractFieldFactory<D extends SwitchableFieldDefinition,com.vaadin.v7.data.util.PropertysetItem>
protected ConfiguredFieldDefinition createSelectFieldDefinition()
SelectFieldDefinition
initialized based on the SwitchableFieldDefinition.getOptions()
and relevant options. StaticFieldDefinition
containing a warn message.Copyright © 2019 Magnolia International Ltd.. All rights reserved.