org.appng.api

## Interface FieldConverter

- All Known Implementing Classes:
    FieldConversionFactory

      public interface FieldConverter

  A `FieldConverter` is responsible for converting
  1. a property of an bindclass-instance to its `String`-representation inside of a `Datafield` (see `setString(FieldWrapper)`)
  2. a parameter from a `RequestContainer` to its object-representation (see `setObject(FieldWrapper, RequestContainer)`)
  Author:
    Matthias Müller

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `FieldConverter.DatafieldOwner` A `DatafieldOwner` owns several `Datafield`s and also `Linkpanel`s.
    `static class` | `FieldConverter.FieldDefOwner` /** A `DatafieldOwner` owns several `FieldDef`s and also `Linkpanel`s.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Datafield` | `addField(FieldConverter.DatafieldOwner dataFieldOwner, FieldWrapper fieldWrapper)` Creates a `Datafield` and add it to the given `FieldConverter.DatafieldOwner`, using `FieldWrapper.getStringValue()` for the `Datafield`'s value.
    `void` | `reset(FieldWrapper field)`
    `void` | `setObject(FieldWrapper field, RequestContainer request)` Sets the `Object` for the given `FieldWrapper`, using the given `RequestContainer` as the parameter source.
    `void` | `setString(FieldWrapper field)` Transforms the property identified by `FieldWrapper.getBinding()` to it's `String` representation, which is used as an argument for `Datafield.setValue(String)` in `addField(DatafieldOwner, FieldWrapper)`.

- - ### Method Detail

    - #### reset

          void reset(FieldWrapper field)

      Parameters:
        `field` -

    - #### setString

          void setString(FieldWrapper field)

      Transforms the property identified by `FieldWrapper.getBinding()` to it's `String` representation, which is used as an argument for `Datafield.setValue(String)` in `addField(DatafieldOwner, FieldWrapper)`.
      Parameters:
        `field` - the `FieldWrapper`
      See Also:
        `FieldWrapper.setStringValue(String)`

    - #### setObject

          void setObject(FieldWrapper field,
                         RequestContainer request)

      Sets the `Object` for the given `FieldWrapper`, using the given `RequestContainer` as the parameter source.
      Parameters:
        `field` - the `FieldWrapper`
        `request` - the `RequestContainer`
      See Also:
        `FieldWrapper.setObject(Object)`

    - #### addField

          Datafield addField(FieldConverter.DatafieldOwner dataFieldOwner,
                             FieldWrapper fieldWrapper)

      Creates a `Datafield` and add it to the given `FieldConverter.DatafieldOwner`, using `FieldWrapper.getStringValue()` for the `Datafield`'s value.
      Parameters:
        `dataFieldOwner` - the `FieldWrapper`
        `fieldWrapper` - the `FieldWrapper`
      Returns:
        the `Datafield` which has been added, if any

Copyright © 2011–2023 aiticon GmbH. All rights reserved.