- java.lang.Object
-
- org.omnifaces.converter.TrimConverter
-
- org.omnifaces.converter.ToUpperCaseConverter
-
public class ToUpperCaseConverter extends TrimConverter
The
omnifaces.ToUpperCaseConverter
is intented to convert submittedString
values to upper case based on currentLocale
. 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 theconverter
attribute of the component referring theString
property. For example:<h:inputText value="#{bean.zipCode}" converter="omnifaces.ToUpperCaseConverter" />
- Since:
- 2.6
- Author:
- Bauke Scholtz
- See Also:
TrimConverter
-
-
Field Summary
-
Fields inherited from interface jakarta.faces.convert.Converter
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
-
-
Constructor Summary
Constructors Constructor Description ToUpperCaseConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAsObject(FacesContext context, UIComponent component, String submittedValue)
-
Methods inherited from class org.omnifaces.converter.TrimConverter
getAsString
-
-
-
-
Method Detail
-
getAsObject
public String getAsObject(FacesContext context, UIComponent component, String submittedValue)
- Specified by:
getAsObject
in interfaceConverter<String>
- Overrides:
getAsObject
in classTrimConverter
-
-