com.tonbeller.wcf.convert
Class BooleanConverter
java.lang.Object
com.tonbeller.wcf.convert.NodeConverterBase
com.tonbeller.wcf.convert.BooleanConverter
- All Implemented Interfaces:
- NodeConverter
- Direct Known Subclasses:
- CheckBoxConverter, RadioButtonConverter
- public abstract class BooleanConverter
- extends NodeConverterBase
- Author:
- av
Converter for RadioButton and CheckBox.
Method Summary |
void |
convert(Formatter fmt,
java.util.Map params,
java.util.Map fileParams,
org.w3c.dom.Element elem,
java.lang.Object bean)
sets the selected attribute of the DOM element. |
void |
convert(Formatter fmt,
java.lang.Object bean,
org.w3c.dom.Element elem)
sets the selected attribute of the checkbox from the bean |
abstract int |
isSelected(org.w3c.dom.Element elem,
java.util.Map params)
evaluates the http paramters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UNKNOWN
public static final int UNKNOWN
- See Also:
- Constant Field Values
TRUE
public static final int TRUE
- See Also:
- Constant Field Values
FALSE
public static final int FALSE
- See Also:
- Constant Field Values
BooleanConverter
public BooleanConverter()
convert
public void convert(Formatter fmt,
java.util.Map params,
java.util.Map fileParams,
org.w3c.dom.Element elem,
java.lang.Object bean)
throws FormatException,
java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- sets the selected attribute of the DOM element. If a modelReference
is specified, it must point to a boolean bean-property that will be updated.
- Parameters:
fmt
- Formatter for i18n string-object conversionparams
- parameters of http requestelem
- the target element.bean
- the target bean
- Throws:
FormatException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
isSelected
public abstract int isSelected(org.w3c.dom.Element elem,
java.util.Map params)
- evaluates the http paramters. Does not evaluate the selected attribute of the DOM Element.
- Returns:
- one of TRUE, FALSE, UNKNOWN
convert
public void convert(Formatter fmt,
java.lang.Object bean,
org.w3c.dom.Element elem)
throws java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- sets the selected attribute of the checkbox from the bean
- Throws:
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException