Class ReadOnlyUICustomWidget

All Implemented Interfaces:
UIWidget

public class ReadOnlyUICustomWidget extends UISimpleCustomWidget
A custom UI widget that enforces read-only rights on a field within a form.

This widget extends UISimpleCustomWidget and is designed to be used when a field needs to be displayed in a read-only state, preventing any user input.

Author:
APGAR Consulting
  • Constructor Details

    • ReadOnlyUICustomWidget

      public ReadOnlyUICustomWidget(Path path, WidgetFactoryContext context)
      Constructs a new ReadOnlyUICustomWidget for the specified path within the provided context.
      Parameters:
      path - the path to the field that this widget will represent
      context - the widget factory context providing additional information for widget creation
  • Method Details

    • write

      public void write(WidgetWriter writer, WidgetDisplayContext context)
      Renders the widget in the UI, setting the associated field to read-only.
      Specified by:
      write in class UISimpleCustomWidget
      Parameters:
      writer - the WidgetWriter used to output the widget in the UI
      context - the WidgetDisplayContext providing information about how the widget should be displayed