Interface FieldArrayGridField<F extends FieldArrayGridField<F>>

All Superinterfaces:
ActionGrid<F>, Comparable<F>, Component<F>, Copyable<F>, CustomCssComponent<F>, Field<F>, FieldArrayField<F>, FormComponent<F>, Grid<F>, Orderable<F>, Selectable<F>, Serializable
All Known Implementing Classes:
DefaultFieldArrayGridField

public interface FieldArrayGridField<F extends FieldArrayGridField<F>> extends FieldArrayField<F>, Orderable<F>
Represents the metadata for a FieldTypes.FIELD_ARRAY_GRID field. These type of collections are most useful for collections that are resident on the parent document, such as Product's `attributes` collection. This should not be used for collections with references to external documents.
Author:
Dima Myroniuk (dmyroniuk)
  • Method Details

    • maxRows

      default F maxRows(String maxRowsKey)
      Sets the key that matches the form value to determine the maximum number of rows/entries for the grid. When the maximum number of rows/entries for a grid is reached, the grid will prevent the user from adding any more entries. If this attribute is unset, there is no imposed limit to the number of entries the user can add to the grid.
      Parameters:
      maxRowsKey - The key that gets the value for the maximum row limit
      Returns:
      this field
      Since:
      2.0.6
    • getMaxRows

      default String getMaxRows()
      Returns:
      The configured maximum number of rows for the grid
      Throws:
      IllegalArgumentException - if no attribute exists at the key
    • findMaxRows

      default Optional<String> findMaxRows()
      Returns:
      the value of the attribute or Optional.empty() if not present.