org.apache.myfaces.custom.convertDateTime
Class DateTimeConverter

java.lang.Object
  extended by javax.faces.convert.DateTimeConverter
      extended by org.apache.myfaces.custom.convertDateTime.DateTimeConverter
All Implemented Interfaces:
javax.faces.component.StateHolder, javax.faces.convert.Converter

public class DateTimeConverter
extends javax.faces.convert.DateTimeConverter

Simple convert that overrides the spec DateTimeConverter and uses TimeZone.getDefault() as the base timezone, rather than GMT. Convert date time using normal system timezone like it should


Field Summary
static java.lang.String CONVERTER_ID
           
 
Fields inherited from class javax.faces.convert.DateTimeConverter
DATE_ID, DATETIME_ID, STRING_ID, TIME_ID
 
Constructor Summary
DateTimeConverter()
           
 
Method Summary
 java.lang.String getDateStyle()
          longDesc = "default|short|medium|long|full"
 java.util.Locale getLocale()
          longDesc = "locale"
 java.lang.String getPattern()
          Custom formatting pattern
 java.lang.String getTimeStyle()
          default|short|medium|long|full
 java.util.TimeZone getTimeZone()
          timeZome
 java.lang.String getType()
          date|time|both
 
Methods inherited from class javax.faces.convert.DateTimeConverter
getAsObject, getAsString, isTransient, restoreState, saveState, setDateStyle, setLocale, setPattern, setTimeStyle, setTimeZone, setTransient, setType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONVERTER_ID

public static final java.lang.String CONVERTER_ID
See Also:
Constant Field Values
Constructor Detail

DateTimeConverter

public DateTimeConverter()
Method Detail

getDateStyle

public java.lang.String getDateStyle()
longDesc = "default|short|medium|long|full"

Overrides:
getDateStyle in class javax.faces.convert.DateTimeConverter

getLocale

public java.util.Locale getLocale()
longDesc = "locale"

Overrides:
getLocale in class javax.faces.convert.DateTimeConverter

getPattern

public java.lang.String getPattern()
Custom formatting pattern

Overrides:
getPattern in class javax.faces.convert.DateTimeConverter

getTimeStyle

public java.lang.String getTimeStyle()
default|short|medium|long|full

Overrides:
getTimeStyle in class javax.faces.convert.DateTimeConverter

getTimeZone

public java.util.TimeZone getTimeZone()
timeZome

Overrides:
getTimeZone in class javax.faces.convert.DateTimeConverter

getType

public java.lang.String getType()
date|time|both

Overrides:
getType in class javax.faces.convert.DateTimeConverter


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.