info.magnolia.ui.form.field.transformer.composite
Class SwitchableTransformer
java.lang.Object
info.magnolia.ui.form.field.transformer.basic.BasicTransformer<com.vaadin.data.util.PropertysetItem>
info.magnolia.ui.form.field.transformer.composite.CompositeTransformer
info.magnolia.ui.form.field.transformer.composite.SwitchableTransformer
- All Implemented Interfaces:
- I18NAwareHandler, Transformer<com.vaadin.data.util.PropertysetItem>
public class SwitchableTransformer
- extends CompositeTransformer
Default switchable field Transformer
implementation storing and retrieving SwitchableField informations as PropertysetItem
.
Storing strategy:
- property (definition.getName()) : contain the last selected field name
- property (propertyPrefix + first field name): contain the value of the first field
- property (propertyPrefix + second field name): contain the value of the second field
...
Method Summary |
com.vaadin.data.util.PropertysetItem |
readFromItem()
Transform a specific Item values to a specified type T.
|
void |
writeToItem(com.vaadin.data.util.PropertysetItem newValues)
Convert the T newValue to a specific Item format.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SwitchableTransformer
public SwitchableTransformer(com.vaadin.data.Item relatedFormItem,
ConfiguredFieldDefinition definition,
Class<com.vaadin.data.util.PropertysetItem> type,
List<String> fieldsName)
writeToItem
public void writeToItem(com.vaadin.data.util.PropertysetItem newValues)
- Description copied from interface:
Transformer
- Convert the T newValue to a specific Item format.
- Specified by:
writeToItem
in interface Transformer<com.vaadin.data.util.PropertysetItem>
- Overrides:
writeToItem
in class CompositeTransformer
readFromItem
public com.vaadin.data.util.PropertysetItem readFromItem()
- Description copied from interface:
Transformer
- Transform a specific Item values to a specified type T.
- Specified by:
readFromItem
in interface Transformer<com.vaadin.data.util.PropertysetItem>
- Overrides:
readFromItem
in class CompositeTransformer
Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.