org.zkoss.bind.converter
Class ObjectBooleanConverter
java.lang.Object
org.zkoss.bind.converter.ObjectBooleanConverter
- All Implemented Interfaces:
- Converter
public class ObjectBooleanConverter
- extends java.lang.Object
- implements Converter
Converter to convert boolean to Object.
- Author:
- henrichen
|
Method Summary |
java.lang.Object |
coerceToBean(java.lang.Object val,
Component comp,
BindContext ctx)
Given an object value and return whether it is a "true" object. |
java.lang.Object |
coerceToUi(java.lang.Object val,
Component comp,
BindContext ctx)
Given a Boolean value and return associated "true" object if true; or "false" object if false. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectBooleanConverter
public ObjectBooleanConverter()
coerceToBean
public java.lang.Object coerceToBean(java.lang.Object val,
Component comp,
BindContext ctx)
- Given an object value and return whether it is a "true" object.
- Specified by:
coerceToBean in interface Converter
- Parameters:
val - the object to be checked if a true objectcomp - associated Componentctx - bind context for associate Binding and extra parameter (e.g. true and false)
- Returns:
- the converted Boolean object
coerceToUi
public java.lang.Object coerceToUi(java.lang.Object val,
Component comp,
BindContext ctx)
- Given a Boolean value and return associated "true" object if true; or "false" object if false.
- Specified by:
coerceToUi in interface Converter
- Parameters:
val - the boolean value to be checked.comp - associate Componentctx - bind context for associate Binding and extra parameter (e.g. true and false)
- Returns:
- the converted "true" object if true; or "false" object if false.
Copyright © 2005-2011 Potix Corporation. All Rights Reserved.