Interface ResidentGridField<F extends ResidentGridField<F>>

All Superinterfaces:
ActionGrid<F>, Comparable<F>, Component<F>, Copyable<F>, CustomCssComponent<F>, FetchGrid<F>, Field<F>, Filterable<F>, FormComponent<F>, Grid<F>, Orderable<F>, Selectable<F>, Serializable, SortableGrid<F>
All Known Implementing Classes:
DefaultResidentGridField

public interface ResidentGridField<F extends ResidentGridField<F>> extends ActionGrid<F>, Field<F>, Filterable<F>, Orderable<F>, SortableGrid<F>
Represents the metadata for a resident grid field component. A resident grid field is rendered as a list grid within a form, and allows the management of an embedded collection on the domain. For example, this is useful for managing a set of attributes or other simple objects.
Author:
Nick Crum (ncrum)
  • Method Details

    • addCreateAction

      default F addCreateAction(CreateModalFormAction<?> createAction)
      Add the ResidentGridField.ActionTypes.CREATE action to the grid. This action allows the user to create new members of the collection using a modal form.
      Parameters:
      createAction - the create action
      Returns:
      this
    • createAction

      default F createAction(UnaryOperator<CreateModalFormAction<?>> fn)
      Configures the ResidentGridField.ActionTypes.CREATE action for the grid. This action allows the user to create new members of the collection using a modal form.
      Parameters:
      fn - the function configure the create action
      Returns:
      this
    • createLabel

      default F createLabel(String labelKey)
      Shortcut for changing the label of the create grid action.
      Parameters:
      labelKey - the message key of the label
      Returns:
      this
    • getCreateAction

      default CreateModalFormAction<?> getCreateAction()
      Retrieves the grid action of type ResidentGridField.ActionTypes.CREATE.
      Returns:
      the create action
    • findCreateAction

      default Optional<CreateModalFormAction<?>> findCreateAction()
      Finds the grid action of type ResidentGridField.ActionTypes.CREATE.
      Returns:
      an optional with the create action, or empty
    • addDeleteAction

      default F addDeleteAction(Action<?> deleteAction)
      Add the ResidentGridField.ActionTypes.DELETE action to the grid. This row action allows the user to delete a member of the collection.
      Parameters:
      deleteAction - the delete action
      Returns:
      this
    • deleteAction

      default F deleteAction(UnaryOperator<Action<?>> fn)
      Configures the ResidentGridField.ActionTypes.DELETE action for the grid. This row action allows the user to delete a member of the collection.
      Parameters:
      fn - the function configure the delete action
      Returns:
      this
    • deleteLabel

      default F deleteLabel(String labelKey)
      Shortcut for changing the label of the delete grid action.
      Parameters:
      labelKey - the message key of the label
      Returns:
      this
    • getDeleteAction

      default Action<?> getDeleteAction()
      Retrieves the grid action of type ResidentGridField.ActionTypes.DELETE.
      Returns:
      the delete action
    • findDeleteAction

      default Optional<Action<?>> findDeleteAction()
      Finds the grid action of type ResidentGridField.ActionTypes.DELETE.
      Returns:
      an optional with the delete action, or empty
    • addUpdateAction

      default F addUpdateAction(ModalFormAction<?> updateAction)
      Add the ResidentGridField.ActionTypes.UPDATE action to the grid. This row action allows the user to update existing members of the collection using a modal form.
      Parameters:
      updateAction - the update action
      Returns:
      this
    • updateAction

      default F updateAction(UnaryOperator<ModalFormAction<?>> fn)
      Configures the ResidentGridField.ActionTypes.UPDATE action for the grid. This row action allows the user to update existing members of the collection using a modal form.
      Parameters:
      fn - the function configure the update action
      Returns:
      this
    • updateLabel

      default F updateLabel(String labelKey)
      Shortcut for changing the label of the update grid action.
      Parameters:
      labelKey - the message key of the label
      Returns:
      this
    • getUpdateAction

      default ModalFormAction<?> getUpdateAction()
      Retrieves the grid action of type ResidentGridField.ActionTypes.UPDATE.
      Returns:
      the update action
    • findUpdateAction

      default Optional<ModalFormAction<?>> findUpdateAction()
      Finds the grid action of type ResidentGridField.ActionTypes.UPDATE.
      Returns:
      an optional with the update action, or empty
    • addGenerateTemplateAction

      default F addGenerateTemplateAction(GenerateTemplateAction<?> generateAction)
      Add the ResidentGridField.ActionTypes.UPDATE action to the grid. This row action allows the user to update existing members of the collection using a modal form.
      Parameters:
      generateAction - the update action
      Returns:
      this
    • generateTemplateAction

      default F generateTemplateAction(UnaryOperator<GenerateTemplateAction<?>> fn)
      Configures the ResidentGridField.ActionTypes.UPDATE action for the grid. This row action allows the user to update existing members of the collection using a modal form.
      Parameters:
      fn - the function configure the update action
      Returns:
      this
    • generateTemplateLabel

      default F generateTemplateLabel(String labelKey)
      Shortcut for changing the label of the update grid action.
      Parameters:
      labelKey - the message key of the label
      Returns:
      this
    • getGenerateTemplateAction

      default GenerateTemplateAction<?> getGenerateTemplateAction()
      Retrieves the grid action of type ResidentGridField.ActionTypes.UPDATE.
      Returns:
      the update action
    • findGenerateTemplateAction

      default Optional<GenerateTemplateAction<?>> findGenerateTemplateAction()
      Finds the grid action of type ResidentGridField.ActionTypes.UPDATE.
      Returns:
      an optional with the update action, or empty
    • addViewReadOnlyAction

      default F addViewReadOnlyAction(FormAction<?> viewReadOnlyAction)
      Adds a ActionGrid.ActionPlacements.ROW action that allows a user to view the details of the row in a read-only form. This is generally used when a row is not editable yet there is a need to present the details of the row.
      Parameters:
      viewReadOnlyAction - the action to add
      Returns:
      this
    • viewReadOnlyAction

      default F viewReadOnlyAction(UnaryOperator<FormAction<?>> fn)
      Configure the ActionGrid.ActionPlacements.ROW action that allows a user to view the details of the row in a read-only form. This is generally used when a row is not editable yet there is a need to present the details of the row.
      Parameters:
      fn - a function to configure the read-only form
      Returns:
      this
    • viewReadOnlyLabel

      default F viewReadOnlyLabel(String labelKey)
      Shortcut for setting the label of the read-only action.
      Parameters:
      labelKey - the label or label message key
      Returns:
      this
    • getViewReadOnlyAction

      default FormAction<?> getViewReadOnlyAction()
      Returns:
      the read-only action if it exists
    • findViewReadOnlyAction

      default Optional<FormAction<?>> findViewReadOnlyAction()
      Returns:
      an optional with the read-only action, or empty