org.apache.shale.clay.convert
Class TimeZoneConverter

java.lang.Object
  extended by org.apache.shale.clay.convert.TimeZoneConverter
All Implemented Interfaces:
javax.faces.convert.Converter

public class TimeZoneConverter
extends java.lang.Object
implements javax.faces.convert.Converter

Converts a time zone id literal string into the TimeZone and back to a string.


Constructor Summary
TimeZoneConverter()
           
 
Method Summary
 java.lang.Object getAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, java.lang.String value)
          Converts the string zone ID into a TimeZone object.
 java.lang.String getAsString(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, java.lang.Object value)
          Converts a TimeZone object into the string zone id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeZoneConverter

public TimeZoneConverter()
Method Detail

getAsObject

public java.lang.Object getAsObject(javax.faces.context.FacesContext facesContext,
                                    javax.faces.component.UIComponent component,
                                    java.lang.String value)

Converts the string zone ID into a TimeZone object.

Specified by:
getAsObject in interface javax.faces.convert.Converter
Parameters:
facesContext - jsf faces context
component - converter assigned
value - to be converterd
Returns:
strong typed value

getAsString

public java.lang.String getAsString(javax.faces.context.FacesContext facesContext,
                                    javax.faces.component.UIComponent component,
                                    java.lang.Object value)

Converts a TimeZone object into the string zone id.

Specified by:
getAsString in interface javax.faces.convert.Converter
Parameters:
facesContext - jsf faces context
component - converter assigned
value - to be converterd
Returns:
string represention of the value


Copyright © 2004-2008 Apache Software Foundation. All Rights Reserved.