Class GenericTableFilterCustomWidget

java.lang.Object
com.orchestranetworks.ui.form.widget.UICustomWidget
com.orchestranetworks.ui.form.widget.UISimpleCustomWidget
com.apgar.common.lib.ui.widget.generictablefilterwidget.GenericTableFilterCustomWidget
All Implemented Interfaces:
UIWidget

public class GenericTableFilterCustomWidget extends UISimpleCustomWidget
Custom widget that displays a filtered list of records from a target table as a UIComboBox.

Filtering behavior is controlled via an optional GenericFilter.

Author:
APGAR Consulting
  • Constructor Details

    • GenericTableFilterCustomWidget

      public GenericTableFilterCustomWidget(Path path, WidgetFactoryContext context)
      Constructs a new GenericTableFilterCustomWidget 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 as a combo box with items filtered using GenericFilter.

      If isReadOnlyAfterCreate is enabled, the widget will be set to read-only when the record is neither being created nor duplicated.

      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
    • getGenericFilter

      public GenericFilter getGenericFilter()
      Returns:
      the configured GenericFilter.
    • setGenericFilter

      public void setGenericFilter(GenericFilter genericFilter)
      Parameters:
      genericFilter - filter to determine whether a given record should appear in the widget's selection list
    • getIsReadOnlyAfterCreate

      public boolean getIsReadOnlyAfterCreate()
      Returns:
      true if widget becomes read-only after record creation/duplication.
    • setIsReadOnlyAfterCreate

      public void setIsReadOnlyAfterCreate(boolean isReadOnlyAfterCreate)
      Parameters:
      isReadOnlyAfterCreate - whether widget should be read-only after record creation/duplication.