public class DateFormatConverter extends Object implements TypeConverter, 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 |
|---|---|
Object |
coerceToBean(Object val,
org.zkoss.zk.ui.Component comp)
Deprecated.
Convert an value object to bean property type.
|
Object |
coerceToUi(Object val,
org.zkoss.zk.ui.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 Object coerceToBean(Object val, org.zkoss.zk.ui.Component comp)
TypeConvertercoerceToBean in interface TypeConverterval - the object to be coerced to backend bean property type.comp - associated componentTypeConverter.IGNORE
if you want DataBinder to ignore the assignment.public Object coerceToUi(Object val, org.zkoss.zk.ui.Component comp)
coerceToUi in interface TypeConverterval - 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 © 2015. All rights reserved.