Package org.zkoss.bind.converter
Class FormattedTimeConverter
- java.lang.Object
-
- org.zkoss.bind.converter.FormattedTimeConverter
-
- All Implemented Interfaces:
java.io.Serializable
,Converter
public class FormattedTimeConverter extends java.lang.Object implements Converter, java.io.Serializable
Converter to convert String to Time (Date Object).- Since:
- 8.0.0
- Author:
- JamesChu
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface org.zkoss.bind.Converter
IGNORED_VALUE
-
-
Constructor Summary
Constructors Constructor Description FormattedTimeConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
coerceToUi
public java.lang.Object coerceToUi(java.lang.Object val, Component comp, BindContext ctx)
Convert Date to String.- Specified by:
coerceToUi
in interfaceConverter
- Parameters:
val
- date to be convertedcomp
- associated componentctx
- bind context for associateBinding
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 interfaceConverter
- Parameters:
val
- date in string formcomp
- associated componentctx
- bind context for associateBinding
and extra parameter (e.g. format)- Returns:
- the converted Date
-
-