Package de.xima.fc.gui.component.tagify
Class AStringListConverter
- java.lang.Object
-
- de.xima.fc.gui.component.tagify.AStringListConverter
-
- All Implemented Interfaces:
IListConverter
- Direct Known Subclasses:
DelimitedStringListConverter
,PlaceholderStringListConverter
public abstract class AStringListConverter extends Object implements IListConverter
A list converter for theTagify
component. It converts a list of strings to a string by joining each string, separated by the given main delimiter.Extend this class and override split(String) to implement the desired splitting behavior.
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description AStringListConverter(char mainDelimiter)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description List<Object>
convertToList(Object value)
Converts the model value of the backing bean to a list of tags.Object
convertToObject(List<Object> list)
Converts the list of tags to the model value of the backing bean.protected char
getMainDelimiter()
protected abstract Iterator<String>
split(String value)
-
-
-
Method Detail
-
convertToList
public final List<Object> convertToList(Object value)
Description copied from interface:IListConverter
Converts the model value of the backing bean to a list of tags. The items in the returned list must be compatible with the converter specified for the tagify component (UIOutput.setConverter(javax.faces.convert.Converter)
).- Specified by:
convertToList
in interfaceIListConverter
- Parameters:
value
- The model value, as returned byUIInput.getValue()
.- Returns:
- A list of tags to render.
-
convertToObject
public final Object convertToObject(List<Object> list)
Description copied from interface:IListConverter
Converts the list of tags to the model value of the backing bean. The items in the list are of the same type as returned by the converter specified for the tagify componentUIOutput.getConverter()
.- Specified by:
convertToObject
in interfaceIListConverter
- Parameters:
list
- The current list of tags.- Returns:
- The model value that will be set on the backing bean.
-
getMainDelimiter
protected final char getMainDelimiter()
-
-