org.appng.formtags

## Class FormData

- java.lang.Object
- - org.appng.formtags.FormData

-     public class FormData
      extends Object

  A `FormData` contains the actual `FormElement`s/`FormGroup`s of a `Form`.
  Author:
    Matthias Müller
  See Also:
    `Form`, `FormElement`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `FormData.FormDataMode` Defines when to display the `FormData`.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected List<FormElement>` | `elements`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `FormElement` | `addFormElement()` Adds a new `FormElement` to this `FormData` and returns it.
    `FormGroup` | `addFormGroup()` Adds a new `FormGroup` to this `FormData` and returns it.
    `List<FormElement>` | `getElements()` Returns an immutable `List` containing all `FormElement`s of this `FormData`.
    `Form` | `getForm()`
    `FormData.FormDataMode` | `getMode()` Returns the `FormData.FormDataMode` for this `FormData`.
    `boolean` | `hasErrors()`
    `void` | `setForm(Form form)`
    `void` | `setMode(FormData.FormDataMode mode)` Sets the `FormData.FormDataMode` for this `FormData`.
    `void` | `setMode(String mode)` Sets the `FormData.FormDataMode` for this `FormData` from a given `String`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### elements

          protected List<FormElement> elements

  - ### Method Detail

    - #### getMode

          public FormData.FormDataMode getMode()

      Returns the `FormData.FormDataMode` for this `FormData`.
      Returns:
        the `FormData.FormDataMode`

    - #### setMode

          public void setMode(FormData.FormDataMode mode)

      Sets the `FormData.FormDataMode` for this `FormData`.
      Parameters:
        `mode` - the `FormData.FormDataMode`

    - #### setMode

          public void setMode(String mode)

      Sets the `FormData.FormDataMode` for this `FormData` from a given `String`.
      Parameters:
        `mode` - a `String`
      Throws:
        `IllegalArgumentException` - if the `String` does not represent a valid `FormData.FormDataMode`

    - #### addFormElement

          public FormElement addFormElement()

      Adds a new `FormElement` to this `FormData` and returns it.
      Returns:
        the added `FormElement`
      See Also:
        `FormElement`

    - #### addFormGroup

          public FormGroup addFormGroup()

      Adds a new `FormGroup` to this `FormData` and returns it.
      Returns:
        the added `FormGroup`
      See Also:
        `FormGroup`

    - #### getElements

          public List<FormElement> getElements()

      Returns an immutable `List` containing all `FormElement`s of this `FormData`. This not only includes the `FormElement`s added via `addFormElement()`, but also those `FormElement`s of the `FormGroup`s added via `addFormGroup()`.
      Returns:
        a `List` of `FormElement`s

    - #### hasErrors

          public boolean hasErrors()

    - #### getForm

          public Form getForm()

    - #### setForm

          public void setForm(Form form)

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