Package org.zkoss.bind.converter
Class FormatedDateConverter
- java.lang.Object
-
- 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
Constructors Constructor Description FormatedDateConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectcoerceToBean(java.lang.Object val, org.zkoss.zk.ui.Component comp, BindContext ctx)Convert String to Date.java.lang.ObjectcoerceToUi(java.lang.Object val, org.zkoss.zk.ui.Component comp, BindContext ctx)Convert Date to String.
-
-
-
Method Detail
-
coerceToUi
public java.lang.Object coerceToUi(java.lang.Object val, org.zkoss.zk.ui.Component comp, BindContext ctx)Convert Date to String.- Specified by:
coerceToUiin interfaceConverter- Parameters:
val- date to be convertedcomp- associated componentctx- bind context for associateBindingand extra parameter (e.g. format)- Returns:
- the converted String
-
coerceToBean
public java.lang.Object coerceToBean(java.lang.Object val, org.zkoss.zk.ui.Component comp, BindContext ctx)Convert String to Date.- Specified by:
coerceToBeanin interfaceConverter- Parameters:
val- date in string formcomp- associated componentctx- bind context for associateBindingand extra parameter (e.g. format)- Returns:
- the converted Date
-
-