java.lang.Object
org.omnifaces.converter.CompositeConverter
The o:compositeConverter allows multiple converters to be chained together.
Usage
This converter is available by <o:compositeConverter> tag.
<h:inputText value="#{bean.value}">
<o:compositeConverter converterIds="trimConverter, sanitizeConverter, entityConverter" />
</h:inputText>
Execution Order
The converters are executed in the order they are defined in the converterIds attribute during the getAsObject and in reverse order during the getAsString.
- getAsObject: Executed 1st → 2nd → 3rd. The result of the first converter is passed as the input to the next converter.
- getAsString: Executed 3rd → 2nd → 1st. The result of the last converter is passed as the input to the previous converter to ensure symmetry.
- Since:
- 5.1
- Author:
- Bauke Scholtz
-
Field Summary
Fields inherited from interface jakarta.faces.convert.Converter
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAsObject(FacesContext context, UIComponent component, String submittedValue) getAsString(FacesContext context, UIComponent component, Object modelValue) voidsetConverterIds(String converterIds) Sets the comma-separated string of converter IDs.
-
Constructor Details
-
CompositeConverter
public CompositeConverter()
-
-
Method Details
-
getAsObject
- Specified by:
getAsObjectin interfaceConverter<Object>
-
getAsString
- Specified by:
getAsStringin interfaceConverter<Object>
-
setConverterIds
Sets the comma-separated string of converter IDs.- Parameters:
converterIds- The comma-separated string of converter IDs.
-