com.tonbeller.wcf.convert
Class SelectConverterBase
java.lang.Object
com.tonbeller.wcf.convert.NodeConverterBase
com.tonbeller.wcf.convert.SelectConverterBase
- All Implemented Interfaces:
- NodeConverter
- Direct Known Subclasses:
- SelectMultipleConverter, SelectSingleConverter
- public abstract class SelectConverterBase
- extends NodeConverterBase
- Author:
- av
Method Summary |
void |
convert(Formatter fmt,
java.util.Map params,
java.util.Map fileSource,
org.w3c.dom.Element elem,
java.lang.Object bean)
sets the selected attributes of the DOM item children of elem. calls updateModelReference
if the list is valid (ie not disabled and form was submitted). |
void |
convert(Formatter fmt,
java.lang.Object bean,
org.w3c.dom.Element elem)
updates the domTarget according to the current property values of beanSource |
protected abstract void |
updateModelReference(Formatter fmt,
org.w3c.dom.Element elem,
java.lang.Object bean)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelectConverterBase
public SelectConverterBase()
convert
public void convert(Formatter fmt,
java.util.Map params,
java.util.Map fileSource,
org.w3c.dom.Element elem,
java.lang.Object bean)
throws ConvertException,
FormatException,
java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- sets the selected attributes of the DOM item children of elem. calls updateModelReference
if the list is valid (ie not disabled and form was submitted).
- Parameters:
fmt
- Formatter to be used to parse and format user inputparams
- a map containing http parameters. key = String, value = String[]elem
- a DOM tree containing UI elements like TextField etc including the following
attributes:
type
the data type, i.e. the id to find the formatter
value
the formatted value will be written to this attribute
formatString
optional, overwrites the default formatString of the FormatHandler
modelReference
optional, if present the attribute name of the bean property.
a jakarta-commons/bean-utils path is supported
id
unique id. Used to identify DOM elements from HTTP Parameters
- Throws:
ConvertException
FormatException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
updateModelReference
protected abstract void updateModelReference(Formatter fmt,
org.w3c.dom.Element elem,
java.lang.Object bean)
throws FormatException,
java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- Throws:
FormatException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
convert
public void convert(Formatter fmt,
java.lang.Object bean,
org.w3c.dom.Element elem)
throws ConvertException,
java.lang.IllegalAccessException,
java.lang.NoSuchMethodException,
java.lang.reflect.InvocationTargetException
- Description copied from interface:
NodeConverter
- updates the domTarget according to the current property values of beanSource
- Throws:
ConvertException
java.lang.IllegalAccessException
java.lang.NoSuchMethodException
java.lang.reflect.InvocationTargetException
- See Also:
NodeConverter.convert(Formatter, Object, Element)