Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /* TypeConverter.java
 
 {{IS_NOTE
 	Purpose:
 		
 	Description:
 		
 	History:
 		Thu Nov 16 12:43:01     2006, Created by Henri Chen
}}IS_NOTE
Copyright (C) 2006 Potix Corporation. All Rights Reserved.
{{IS_RIGHT
}}IS_RIGHT
*/
package org.zkoss.zkplus.databind;
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.

Deprecated:
As of release 7.0.0, replace with new ZK binding.
Author(s):
Henri Chen
public interface TypeConverter {
	public static final Object IGNORE = new Object();

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.
	public Object coerceToUi(Object valComponent comp);

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.
	public Object coerceToBean(Object valComponent comp);
New to GrepCode? Check out our FAQ X