Package com.orchestranetworks.ui.form

# Interface UIFormGroup

public interface UIFormGroup
In the context of a form, specifies a group of form rows or form groups with an indentation.

This indentation is stackable. The maximum depth is 5.

To obtain a simple form group with label set, invoke the method `UIComponentWriter.newFormGroup(UIFormLabelSpec)`. To obtain a default fully model-driven form group, invoke the method `UIFormWriter.newFormGroup(Path)` or `UIResponseContext.newFormGroup(Path)` depending on the context.

Since:
  5.7.0
See Also:
  - `UIComponentWriter.startFormGroup(UIFormGroup)`
  - `UIComponentWriter.endFormGroup()`

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static final class`
  `UIFormGroup.DisplayMode`
  A form group can have several display modes.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `UIFormGroup.DisplayMode`
  `getDisplayMode()`
  `String`
  `getId()`
  Returns the id of the group, `null` if not set.
  `UIFormLabelSpec`
  `getLabel()`
  `void`
  `setDisplayMode(UIFormGroup.DisplayMode displayMode)`
  Sets the display mode to the form group.
  `void`
  `setId(String id)`
  Sets an id for the group.
  `void`
  `setLabel(UIFormLabelSpec aLabel)`
  Sets the label of the form group.

- ## Method Details

  - ### getLabel

    UIFormLabelSpec getLabel()
    Returns:
      the `label` of the form group, or `null` if the form group is fully model-driven

  - ### setLabel

    void setLabel(UIFormLabelSpec aLabel)
    Sets the label of the form group.

    If the group is model-driven, it will override its label.

    Parameters:
      `aLabel` - the new label
    Since:
      5.8.0

  - ### setDisplayMode

    void setDisplayMode(UIFormGroup.DisplayMode displayMode)
    Sets the display mode to the form group.
    See Also:
      - `UIFormGroup.DisplayMode`

  - ### getDisplayMode

    UIFormGroup.DisplayMode getDisplayMode()
    Returns:
      the `UIFormGroup.DisplayMode`, or `null` if not set and thus automatic

  - ### setId

    void setId(String id)
    Sets an id for the group.

    The id attribute must respect the W3C Recommendation (especially by being unique in the page). See https://www.w3.org/TR/REC-html40/struct/global.html#adef-id for more information.

    If no id is specified, an id will be randomly generated.

    Parameters:
      `id` - the id to set for the group.
    Since:
      5.8.0

  - ### getId

    String getId()
    Returns the id of the group, `null` if not set.
    Since:
      5.8.0