Class RowBuilderWidgetRenderer
java.lang.Object
com.kingsrook.qqq.backend.core.actions.dashboard.widgets.AbstractWidgetRenderer
com.kingsrook.qqq.backend.core.actions.dashboard.widgets.RowBuilderWidgetRenderer
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.
- 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Widget Meta Data Builder for this widget type. -
Field Summary
Fields inherited from class com.kingsrook.qqq.backend.core.actions.dashboard.widgets.AbstractWidgetRenderer
dateFormatter, valueFormatter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrender
(RenderWidgetInput input) widgetMetaDataBuilder
(String widgetName) Factory to make a new Builder for widgetMetaData of this type.Methods inherited from class com.kingsrook.qqq.backend.core.actions.dashboard.widgets.AbstractWidgetRenderer
setupDropdowns
-
Constructor Details
-
RowBuilderWidgetRenderer
public RowBuilderWidgetRenderer()
-
-
Method Details
-
widgetMetaDataBuilder
Factory to make a new Builder for widgetMetaData of this type.- Parameters:
widgetName
- unique name for the widget with your QInstance- Returns:
- Builder object, where additional properties can be set to control
widget behavior. Ultimately to have
AbstractWidgetMetaDataBuilder.getWidgetMetaData()
called, to put the meta-data for the widget in a QInstance.
-
render
- Specified by:
render
in classAbstractWidgetRenderer
- Throws:
QException
-