Class RowBuilderWidgetRenderer

java.lang.Object
com.kingsrook.qqq.backend.core.actions.dashboard.widgets.AbstractWidgetRenderer
com.kingsrook.qqq.backend.core.actions.dashboard.widgets.RowBuilderWidgetRenderer

public class RowBuilderWidgetRenderer extends AbstractWidgetRenderer
Generic widget for a form that lets a user add rows. Setup is managed by default values in the widgetMetaData, codified by methods on the inner RowBuilderWidgetRenderer.Builder class.

Use cases:

  • On table view and insert/edit screens:
    • enabled by setting isForRecordViewAndEditScreen = true
    • will submit records as json in a field identified as outputFieldName
    • OR - with associated child records named: associationName
  • In processes:
    • using outputFieldName to define the process value that'll be the json encoded records.

General properties are:
fields
list of QFieldMetaData that define what fields make up a row.
isEditable
does not apply if isForRecordViewAndEditScreen - in which case, edit-ability is driven by whether on view or edit screen) - determine if rows are editable or not (e.g., can be used as just a view-only list of rows).
useModalEditor
only applies if isEditable or isForRecordViewAndEditScreen (and then only on record edit screen) - by default, records can be edited inline on the form - but with this property set to true, a modal editor is used.
mayReorderRows
control if user is shown drag handle to reorder rows when editing. Requires an orderByFieldName to be specified.
orderByFieldName
if using mayReorderRows = true, then this field receives the ordering - e.g., 1, 2, 3.