info.magnolia.ui.form.field.transformer.basic
Class ListToSetTransformer<T>

java.lang.Object
  extended by info.magnolia.ui.form.field.transformer.basic.BasicTransformer<T>
      extended by info.magnolia.ui.form.field.transformer.basic.ListToSetTransformer<T>
Type Parameters:
T -
All Implemented Interfaces:
I18NAwareHandler, Transformer<T>

public class ListToSetTransformer<T>
extends BasicTransformer<T>

Specific MultiSelect field Transformer.
For example, the Vaadin native OptionGroup used as root component of our configured Option Group Field do not support List, but only Sets.


Field Summary
 
Fields inherited from class info.magnolia.ui.form.field.transformer.basic.BasicTransformer
basePropertyName, definition, i18NPropertyName, relatedFormItem, type
 
Constructor Summary
ListToSetTransformer(com.vaadin.data.Item relatedFormItem, ConfiguredFieldDefinition definition, Class<T> type)
           
 
Method Summary
 T readFromItem()
          Transform a specific Item values to a specified type T.
 void writeToItem(T newValue)
          Convert the T newValue to a specific Item format.
 
Methods inherited from class info.magnolia.ui.form.field.transformer.basic.BasicTransformer
definePropertyName, getBasePropertyName, getLocale, getOrCreateProperty, getType, hasI18NSupport, setI18NPropertyName, setLocale, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ListToSetTransformer

public ListToSetTransformer(com.vaadin.data.Item relatedFormItem,
                            ConfiguredFieldDefinition definition,
                            Class<T> type)
Method Detail

writeToItem

public void writeToItem(T newValue)
Description copied from interface: Transformer
Convert the T newValue to a specific Item format.

Specified by:
writeToItem in interface Transformer<T>
Overrides:
writeToItem in class BasicTransformer<T>

readFromItem

public T readFromItem()
Description copied from interface: Transformer
Transform a specific Item values to a specified type T.

Specified by:
readFromItem in interface Transformer<T>
Overrides:
readFromItem in class BasicTransformer<T>


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.