public class ToUpperCaseConverter extends TrimConverter
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()
.
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" />
TrimConverter
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
Constructor and Description |
---|
ToUpperCaseConverter() |
Modifier and Type | Method and Description |
---|---|
String |
getAsObject(FacesContext context,
UIComponent component,
String submittedValue) |
getAsString
public String getAsObject(FacesContext context, UIComponent component, String submittedValue)
getAsObject
in interface Converter<String>
getAsObject
in class TrimConverter
Copyright © 2012–2018 OmniFaces. All rights reserved.