Package de.xima.fc.gui.common.converter
Class GenericStringTrimConverter
java.lang.Object
de.xima.fc.gui.common.converter.GenericStringTrimConverter
- All Implemented Interfaces:
javax.faces.convert.Converter<Object>
public class GenericStringTrimConverter
extends Object
implements javax.faces.convert.Converter<Object>
Similar to
StringTrimConverter, but does not register itself automatically and Object as its target
type. The actual runtime type of the value should still be string String, but this converter is useful when
your model has a type parameter that is set to String#. In this case, JSF will detect the type as
Object and will not apply the StringTrimConverter. You can explicitly set this converter if you need
the value to be trimmed.- Since:
- 7.0.11
- Author:
- XIMA MEDIA GmbH
-
Field Summary
Fields inherited from interface javax.faces.convert.Converter
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value) getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent cmp, Object value)
-
Constructor Details
-
GenericStringTrimConverter
public GenericStringTrimConverter()
-
-
Method Details
-
getAsObject
public Object getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value) - Specified by:
getAsObjectin interfacejavax.faces.convert.Converter<Object>
-
getAsString
public String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent cmp, Object value) - Specified by:
getAsStringin interfacejavax.faces.convert.Converter<Object>
-