info.magnolia.ui.form.field.factory
Class SwitchableFieldFactory<D extends FieldDefinition>
java.lang.Object
info.magnolia.ui.form.AbstractFormItem
info.magnolia.ui.form.field.factory.AbstractFieldFactory<SwitchableFieldDefinition,com.vaadin.data.util.PropertysetItem>
info.magnolia.ui.form.field.factory.SwitchableFieldFactory<D>
- Type Parameters:
D
- definition type
- All Implemented Interfaces:
- FieldFactory, FormItem
public class SwitchableFieldFactory<D extends FieldDefinition>
- extends AbstractFieldFactory<SwitchableFieldDefinition,com.vaadin.data.util.PropertysetItem>
Creates a @ link SwitchableField} based on definition.
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).
Methods inherited from class info.magnolia.ui.form.field.factory.AbstractFieldFactory |
createDefaultValue, createField, getDefaultFieldType, getDefinitionType, getFieldDefinition, getFieldType, getI18nBasename, getView, setComponentProvider, setFieldValidatorFactoryFactory, setI18nContentSupport, setPropertyDataSourceAndDefaultValue, setPropertyDataSourceDefaultValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SwitchableFieldFactory
@Inject
public SwitchableFieldFactory(SwitchableFieldDefinition definition,
com.vaadin.data.Item relatedFieldItem,
FieldFactoryFactory fieldFactoryFactory,
info.magnolia.cms.i18n.I18nContentSupport i18nContentSupport,
info.magnolia.objectfactory.ComponentProvider componentProvider)
createFieldComponent
protected com.vaadin.ui.Field<com.vaadin.data.util.PropertysetItem> createFieldComponent()
- Description copied from class:
AbstractFieldFactory
- Implemented by subclasses to create and initialize the Vaadin Field instance to use.
- Specified by:
createFieldComponent
in class AbstractFieldFactory<SwitchableFieldDefinition,com.vaadin.data.util.PropertysetItem>
initializeTransformer
protected Transformer<?> initializeTransformer(Class<? extends Transformer<?>> transformerClass)
- Create a new Instance of
Transformer
.
- Overrides:
initializeTransformer
in class AbstractFieldFactory<SwitchableFieldDefinition,com.vaadin.data.util.PropertysetItem>
Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.