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 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
 Object getAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, String value)
          Converts the string zone ID into a TimeZone object.
 String getAsString(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, 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 Object getAsObject(javax.faces.context.FacesContext facesContext,
                          javax.faces.component.UIComponent component,
                          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 String getAsString(javax.faces.context.FacesContext facesContext,
                          javax.faces.component.UIComponent component,
                          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-2007 Apache Software Foundation. All Rights Reserved.