java.lang.Object
org.omnifaces.converter.TrimConverter
org.omnifaces.converter.ToUpperCaseConverter
The omnifaces.ToUpperCaseConverter is intented to convert submitted String values to upper case
based on current Locale. Additionally, it trims any whitespace from the submitted value. This is useful for
among others zip code inputs.
This converter does by design no conversion in getAsString().
Usage
This converter is available by converter ID omnifaces.ToUpperCaseConverter. Just specify it in the
converter attribute of the component referring the String property. For example:
<h:inputText value="#{bean.zipCode}" converter="omnifaces.ToUpperCaseConverter" />
Since OmniFaces 4.5 it's also available by <o:toUpperCaseConverter> tag.
<h:inputText value="#{bean.zipCode}">
<o:toUpperCaseConverter />
</h:inputText>
- Since:
- 2.6
- Author:
- Bauke Scholtz
- See Also:
-
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) Methods inherited from class org.omnifaces.converter.TrimConverter
getAsString
-
Constructor Details
-
ToUpperCaseConverter
public ToUpperCaseConverter()
-
-
Method Details
-
getAsObject
- Specified by:
getAsObjectin interfaceConverter<String>- Overrides:
getAsObjectin classTrimConverter
-