Package com.webmethods.caf.faces.convert
Class BaseConverter
java.lang.Object
com.webmethods.caf.faces.convert.BaseConverter
- All Implemented Interfaces:
Converter
- Direct Known Subclasses:
CollectionConverter
,CurrencyNumberConverter
,FormattedBooleanConverter
,FormattedDateTimeConverter
,FormattedNumberConverter
,MapConverter
,PortalURIConverter
,PrincipalAttributeValueSourceConverter
,StringArrayConverter
,URLConverter
Created by IntelliJ IDEA.
Date: Jan 3, 2006
Time: 6:01:33 PM
To change this template use File | Settings | File Templates.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
protected boolean
protected Locale
protected String
Fields inherited from interface javax.faces.convert.Converter
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBadCommonInputMsg
(String sValParam) getBadInputMsg
(String sValParam) getBadInputMsg
(String sValParam, Throwable ex) getBadInputStringTypeMsg
(String saValCanCnvrt) getBadInputTypeMsg
(String sValParam, String sValType, String saValCanCnvrt) protected Locale
getClientLocale
(FacesContext context) getRegion Set the locale for the validated to use.protected TimeZone
getClientTimeZone
(FacesContext context) Get the user's time zone for the responce header.getCustomMsg get the user defined message for a convervion failure.getRegion Set the locale for the validated to use.boolean
Show the exception cause if availible.protected boolean
isBlankValue
(String value) boolean
isStringObj
(Object obj) isStringObj will check the class and see if the string is not just full of spaces.boolean
void
setCustomErrorMsg
(String sMsg) setCustomMsg Set a localized massage used if the convervion fails.void
setRegion Set the locale for the validated to use.void
setshowCAFErrorMsg
(boolean bShow) Show the exception cause if availible.void
validateFromObject
(FacesContext context, UIComponent component, Object value) void
validateFromString
(FacesContext context, UIComponent component, String value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.faces.convert.Converter
getAsObject, getAsString
-
Field Details
-
BAD_PARAMETER_SHORT_ID
- See Also:
-
BAD_TYPE_SHORT_ID
- See Also:
-
BAD_STRING_SHORT_ID
- See Also:
-
BAD_PARAMETER_LONG_ID
- See Also:
-
BAD_TYPE_LONG_ID
- See Also:
-
BAD_STRING_LONG_ID
- See Also:
-
m_clientLocale
-
m_CustomMessage
-
m_bshowCAFErrorMsg
protected boolean m_bshowCAFErrorMsg
-
-
Constructor Details
-
BaseConverter
public BaseConverter()
-
-
Method Details
-
validateFromString
public void validateFromString(FacesContext context, UIComponent component, String value) throws ConverterException - Throws:
ConverterException
-
validateFromObject
public void validateFromObject(FacesContext context, UIComponent component, Object value) throws ConverterException - Throws:
ConverterException
-
getBadCommonInputMsg
-
getBadInputMsg
-
getBadInputMsg
-
getBadInputTypeMsg
public ConverterException getBadInputTypeMsg(String sValParam, String sValType, String saValCanCnvrt) -
getBadInputStringTypeMsg
-
setRegion
setRegion Set the locale for the validated to use.- Parameters:
region
- the local object to use. Null will make the locale use the session's locale.
-
getRegion
getRegion Set the locale for the validated to use. returns the Locale.toString(). the Construct a locale from a language code. Null or spaces will make the locale use the session's locale. also see java.util.Locale -
getClientLocale
getRegion Set the locale for the validated to use. returns the Locale.toString(). the Construct a locale from a language code. Null or spaces will make the locale use the session's locale. also see java.util.Locale -
getClientTimeZone
Get the user's time zone for the responce header. If this fails use the time zone for the default jvm. -
isStringObj
isStringObj will check the class and see if the string is not just full of spaces.- Parameters:
obj
-- Returns:
- true of the input object is a non-empty string
-
isValue
-
setCustomErrorMsg
setCustomMsg Set a localized massage used if the convervion fails.- Parameters:
sMsg
- message to display for conversion errors.
-
getCustomErrorMsg
getCustomMsg get the user defined message for a convervion failure.- Returns:
- String user defined error message.
-
setshowCAFErrorMsg
public void setshowCAFErrorMsg(boolean bShow) Show the exception cause if availible.- Parameters:
bShow
- exception cause if availible.
-
getshowCAFErrorMsg
public boolean getshowCAFErrorMsg()Show the exception cause if availible.- Returns:
- boolean show exception if availible.
-
isBlankValue
-