Class FormFieldHelper

java.lang.Object
io.mindspice.simplypages.editing.FormFieldHelper

public final class FormFieldHelper extends Object
Utility for consistent labeled form-field fragments used by editable modules.

Mutability and thread-safety: stateless utility; thread-safe.

  • Method Details

    • textField

      public static Component textField(String label, String name, String value)
      Create a labeled text input field.
      Parameters:
      label - The field label
      name - The input name attribute
      value - The current value (may be null)
      Returns:
      A form field component
    • textAreaField

      public static Component textAreaField(String label, String name, String value, int rows)
      Create a labeled textarea field.
      Parameters:
      label - The field label
      name - The textarea name attribute
      value - The current value (may be null)
      rows - Number of rows
      Returns:
      A form field component
    • checkboxField

      public static Component checkboxField(String label, String name, boolean checked)
      Create a labeled checkbox field.
      Parameters:
      label - The field label
      name - The checkbox name attribute
      checked - Whether the checkbox is checked
      Returns:
      A form field component