Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.tonbeller.wcf.convert
Interface NodeConverter

All Known Implementing Classes:
  NodeConverterBase

public interface NodeConverter

Author:
  av

Method Summary
`void` | `convert(Formatter fmt, java.util.Map requestSource, java.util.Map fileSource, org.w3c.dom.Element domTarget, java.lang.Object beanTarget)` converts http parameters in requestSource and updates the domTarget and beanTarget.
`void` | `convert(Formatter fmt, java.lang.Object beanSource, org.w3c.dom.Element domTarget)` updates the domTarget according to the current property values of beanSource
`java.lang.String` | `getElementName()` return the element name that this handler will handle
`void` | `setElementName(java.lang.String elemName)`

Method Detail

### convert

    public void convert(Formatter fmt,
                        java.util.Map requestSource,
                        java.util.Map fileSource,
                        org.w3c.dom.Element domTarget,
                        java.lang.Object beanTarget)
                 throws ConvertException,
                        FormatException,
                        java.lang.IllegalAccessException,
                        java.lang.NoSuchMethodException,
                        java.lang.reflect.InvocationTargetException

  converts http parameters in requestSource and updates the domTarget and beanTarget. the domTarget also contains metadata, e.g. the type and formatString attributes.

  Parameters:
    `fmt` - Formatter to be used to parse and format user input
    `requestSource` - a map containing http parameters. key = String, value = String[]
    `domTarget` - 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`

### convert

    public void convert(Formatter fmt,
                        java.lang.Object beanSource,
                        org.w3c.dom.Element domTarget)
                 throws ConvertException,
                        java.lang.IllegalAccessException,
                        java.lang.NoSuchMethodException,
                        java.lang.reflect.InvocationTargetException

  updates the domTarget according to the current property values of beanSource

  Throws:
    `ConvertException`
    `java.lang.IllegalAccessException`
    `java.lang.NoSuchMethodException`
    `java.lang.reflect.InvocationTargetException`

### getElementName

    public java.lang.String getElementName()

  return the element name that this handler will handle

### setElementName

    public void setElementName(java.lang.String elemName)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD