org.zkoss.zkplus.databind
Class DateFormatConverter
java.lang.Object
org.zkoss.zkplus.databind.DateFormatConverter
- All Implemented Interfaces:
- java.io.Serializable, TypeConverter
Deprecated. As of release 7.0.0, replace with new ZK binding.
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'.
- Since:
- 3.0.9
- Author:
- Henri Chen
- See Also:
- Serialized Form
Method Summary |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DateFormatConverter
public DateFormatConverter()
- Deprecated.
coerceToBean
public java.lang.Object coerceToBean(java.lang.Object val,
Component comp)
- Deprecated.
- Description copied from interface:
TypeConverter
- Convert an value object to bean property type.
- Specified by:
coerceToBean
in interface TypeConverter
- Parameters:
val
- the object to be coerced to backend bean property type.comp
- associated component
- Returns:
- the converted value suitable for assigning into backend bean property; or
TypeConverter.IGNORE
if you want DataBinder to ignore the assignment.
coerceToUi
public 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
- Specified by:
coerceToUi
in interface TypeConverter
- Parameters:
val
- the object to be coerced to UI component attribute type.comp
- associated component
- Returns:
- the converted value suitable for assigning into UI component attribute; or
TypeConverter.IGNORE
if you want DataBinder to ignore the assignment. - See Also:
TypeConverter.coerceToUi(java.lang.Object, org.zkoss.zk.ui.Component)
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.