info.magnolia.ui.form.field.factory
Class OptionGroupFieldFactory
java.lang.Object
info.magnolia.ui.form.AbstractFormItem
info.magnolia.ui.form.field.factory.AbstractFieldFactory<D,Object>
info.magnolia.ui.form.field.factory.SelectFieldFactory<OptionGroupFieldDefinition>
info.magnolia.ui.form.field.factory.OptionGroupFieldFactory
- All Implemented Interfaces:
- FieldFactory, FormItem
public class OptionGroupFieldFactory
- extends SelectFieldFactory<OptionGroupFieldDefinition>
Creates and initializes a select field based on a field definition.
Method Summary |
protected com.vaadin.ui.AbstractSelect |
createFieldComponent()
Implemented by subclasses to create and initialize the Vaadin Field instance to use. |
protected com.vaadin.ui.AbstractSelect |
createSelectionField()
Used to initialize the desired subclass of AbstractSelect field component. |
protected Class<?> |
defineType()
|
protected Transformer<?> |
initializeTransformer(Class<? extends Transformer<?>> transformerClass)
Override in order to define the field property type.
In case of single select, use the default mechanism.
In case of multi select, set property type as HashSet , type used by the Vaadin MultiSelect field. |
Methods inherited from class info.magnolia.ui.form.field.factory.AbstractFieldFactory |
createField, getDefaultFieldType, 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 |
OptionGroupFieldFactory
@Inject
public OptionGroupFieldFactory(OptionGroupFieldDefinition definition,
com.vaadin.data.Item relatedFieldItem,
info.magnolia.objectfactory.ComponentProvider componentProvider)
createFieldComponent
protected com.vaadin.ui.AbstractSelect createFieldComponent()
- Description copied from class:
AbstractFieldFactory
- Implemented by subclasses to create and initialize the Vaadin Field instance to use.
- Overrides:
createFieldComponent
in class SelectFieldFactory<OptionGroupFieldDefinition>
createSelectionField
protected com.vaadin.ui.AbstractSelect createSelectionField()
- Description copied from class:
SelectFieldFactory
- Used to initialize the desired subclass of AbstractSelect field component. Subclasses can override this method.
- Overrides:
createSelectionField
in class SelectFieldFactory<OptionGroupFieldDefinition>
initializeTransformer
protected Transformer<?> initializeTransformer(Class<? extends Transformer<?>> transformerClass)
- Override in order to define the field property type.
In case of single select, use the default mechanism.
In case of multi select, set property type as HashSet
, type used by the Vaadin MultiSelect field.
- Overrides:
initializeTransformer
in class AbstractFieldFactory<OptionGroupFieldDefinition,Object>
defineType
protected Class<?> defineType()
Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.