org.zkoss.zkplus.databind
Interface TypeConverter

All Known Implementing Classes:
CombboxListModelConverter, DateFormatConverter, ListboxListModelConverter, ListModelConverter, RadiogroupSelectedItemConverter, SelectboxListModelConverter, SelectedComboitemConverter, SelectedItemConverter, TabboxSelectedTabConverter

Deprecated. As of release 7.0.0, replace with new ZK binding.

public interface TypeConverter

Converter to cast object class between UI Component attribute and backend data bean property. This interface is used in DataBinder. The implementation of this converter should not hold any state since it is shared by the whole application.

Author:
Henri Chen

Field Summary
static Object IGNORE
          Deprecated. Special Value, when returned in coerceToBean(java.lang.Object, org.zkoss.zk.ui.Component) or coerceToUi(java.lang.Object, org.zkoss.zk.ui.Component), meaning ignore it.
 
Method Summary
 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. Convert an value object to UI component attribute type.
 

Field Detail

IGNORE

static final Object IGNORE
Deprecated. 
Special Value, when returned in coerceToBean(java.lang.Object, org.zkoss.zk.ui.Component) or coerceToUi(java.lang.Object, org.zkoss.zk.ui.Component), meaning ignore it.

Method Detail

coerceToUi

Object coerceToUi(Object val,
                  org.zkoss.zk.ui.Component comp)
Deprecated. 
Convert an value object to UI component attribute type.

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 IGNORE if you want DataBinder to ignore the assignment.

coerceToBean

Object coerceToBean(Object val,
                    org.zkoss.zk.ui.Component comp)
Deprecated. 
Convert an value object to bean property type.

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 IGNORE if you want DataBinder to ignore the assignment.


Copyright © 2014. All rights reserved.