org.zkoss.bind.converter
Class FormatedDateConverter

java.lang.Object
  extended by org.zkoss.bind.converter.FormatedDateConverter
All Implemented Interfaces:
java.io.Serializable, Converter

public class FormatedDateConverter
extends java.lang.Object
implements Converter, java.io.Serializable

Converter to convert String to Date.

Since:
6.0.0
Author:
henrichen
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.zkoss.bind.Converter
IGNORED_VALUE
 
Constructor Summary
FormatedDateConverter()
           
 
Method Summary
 java.lang.Object coerceToBean(java.lang.Object val, Component comp, BindContext ctx)
          Convert String to Date.
 java.lang.Object coerceToUi(java.lang.Object val, Component comp, BindContext ctx)
          Convert Date to String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormatedDateConverter

public FormatedDateConverter()
Method Detail

coerceToUi

public java.lang.Object coerceToUi(java.lang.Object val,
                                   Component comp,
                                   BindContext ctx)
Convert Date to String.

Specified by:
coerceToUi in interface Converter
Parameters:
val - date to be converted
comp - associated component
ctx - bind context for associate Binding and extra parameter (e.g. format)
Returns:
the converted String

coerceToBean

public java.lang.Object coerceToBean(java.lang.Object val,
                                     Component comp,
                                     BindContext ctx)
Convert String to Date.

Specified by:
coerceToBean in interface Converter
Parameters:
val - date in string form
comp - associated component
ctx - bind context for associate Binding and extra parameter (e.g. format)
Returns:
the converted Date


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo