public class DateFormatConverter extends java.lang.Object implements TypeConverter, java.io.Serializable
Convert a Date
or a Timestamp
to a
formated date String. You can specify the date format in 'format' annotation,
and the converter will format the given date for you. e.g.
<label value="@{mydate, converter='org.zkoss.zkplus.databind.DateFormatConverter'}" self="@{format(yyyy/MM/dd)}"/>If format is not given, default to 'MM/dd/yyyy'.
IGNORE
Constructor and Description |
---|
DateFormatConverter()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
coerceToBean(java.lang.Object val,
Component comp)
Deprecated.
Convert an value object to bean property type.
|
java.lang.Object |
coerceToUi(java.lang.Object val,
Component comp)
Deprecated.
Depending whether the data is coming from the database or coming from the datebox
we might be passed either a java.util.Date or a java.sql.Timestamp
|
public java.lang.Object coerceToBean(java.lang.Object val, Component comp)
TypeConverter
coerceToBean
in interface TypeConverter
val
- the object to be coerced to backend bean property type.comp
- associated componentTypeConverter.IGNORE
if you want DataBinder to ignore the assignment.public java.lang.Object coerceToUi(java.lang.Object val, Component comp)
coerceToUi
in interface TypeConverter
val
- the object to be coerced to UI component attribute type.comp
- associated componentTypeConverter.IGNORE
if you want DataBinder to ignore the assignment.TypeConverter.coerceToUi(java.lang.Object, org.zkoss.zk.ui.Component)
Copyright © 2005-2018 Potix Corporation. All Rights Reserved.