com.infragistics.faces.input.converter
Class DateTimeConverter
java.lang.Object
com.infragistics.faces.input.converter.DateTimeConverter
- All Implemented Interfaces:
- javax.faces.convert.Converter, javax.faces.component.StateHolder
- public class DateTimeConverter
- extends java.lang.Object
- implements javax.faces.convert.Converter, javax.faces.component.StateHolder
This class provides a date converter that can use more than one pattern to
parse a date provided as a String
|
Method Summary |
java.lang.Object |
getAsObject(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String value)
|
java.lang.String |
getAsString(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object value)
|
java.lang.String |
getEditMasks()
Returns the String holding the patterns used to edit/display the current
date. |
java.util.Locale |
getLocale()
|
java.util.TimeZone |
getTimeZone()
|
boolean |
isTransient()
|
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setEditMasks(java.lang.String editMasks)
Sets the String holding the date patterns separated by ';' |
void |
setLocale(java.util.Locale locale)
|
void |
setTimeZone(java.util.TimeZone timeZone)
|
void |
setTransient(boolean transientFlag)
|
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CONVERTER_ID
public static final java.lang.String CONVERTER_ID
- See Also:
- Constant Field Values
EDIT_MASKS_SEPARATOR
public static java.lang.String EDIT_MASKS_SEPARATOR
DateTimeConverter
public DateTimeConverter()
getAsObject
public java.lang.Object getAsObject(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.String value)
- Specified by:
getAsObject in interface javax.faces.convert.Converter
getAsString
public java.lang.String getAsString(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
java.lang.Object value)
- Specified by:
getAsString in interface javax.faces.convert.Converter
getEditMasks
public java.lang.String getEditMasks()
- Returns the String holding the patterns used to edit/display the current
date. Several masks can be defined, char ';' is used as a separator for
these masks. The display mask is the first edit mask in the list. The
syntax of the pattern is identical to the one used by the class
SimpleDateFormat. A default value is provided based upon the current
locale (MEDIUM format)
- Returns:
- the editMasks to use
getLocale
public java.util.Locale getLocale()
getTimeZone
public java.util.TimeZone getTimeZone()
isTransient
public boolean isTransient()
- Specified by:
isTransient in interface javax.faces.component.StateHolder
restoreState
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object state)
- Specified by:
restoreState in interface javax.faces.component.StateHolder
saveState
public java.lang.Object saveState(javax.faces.context.FacesContext context)
- Specified by:
saveState in interface javax.faces.component.StateHolder
setEditMasks
public void setEditMasks(java.lang.String editMasks)
- Sets the String holding the date patterns separated by ';'
- Parameters:
editMasks -
setLocale
public void setLocale(java.util.Locale locale)
setTransient
public void setTransient(boolean transientFlag)
- Specified by:
setTransient in interface javax.faces.component.StateHolder
setTimeZone
public void setTimeZone(java.util.TimeZone timeZone)