Interface Grid<G extends Grid<G>>
- All Superinterfaces:
Comparable<G>,Component<G>,Copyable<G>,Serializable
- All Known Subinterfaces:
ActionGrid<G>,EntityGridView<V>,ExportGrid<G>,ExportHistoryEntityGridView<V>,ExportHistoryGrid<G>,ExportHistoryGridExternal<E>,FetchGrid<G>,FilterableGrid<G>,GridExternal<E>,GridView<V>,ImportGrid<G>,LookupFieldModal<V>,Orderable<R>,ResidentGridField<F>,ResidentMapField<F>,ResourceGrid<G>,SelectTargetEntityGridView<V>,SortableGrid<G>,TreeGridView<V>
- All Known Implementing Classes:
DefaultEntityGridView,DefaultExportHistoryEntityGridView,DefaultExportHistoryGridExternal,DefaultGridExternal,DefaultLookupFieldModal,DefaultResidentGridField,DefaultResidentMapField,DefaultSelectTargetEntityGridView,DefaultTreeGridView
An interface representing a grid with a collection of
Column.- Author:
- Nick Crum (ncrum)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptiondefault GAdds a column to this grid.default GAdds a string column with the given name to this grid.default GAdds a column with the given property name to this grid.default GaddColumns(Collection<Column<?>> columns) Adds a collection of columns to this grid.findColumn(String name) Finds the column with the given property name.default Column<?>Retrieves the column with the given property name, if it exists.default GDefine the property used as the unique identifier for the data in a row.default GremoveColumn(String name) Removes the column with the given name.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface com.broadleafcommerce.metadata.dsl.core.Component
addAction, addAction, addComponent, addEndpoint, addEndpoint, apply, attribute, augmentationKey, classifier, clearConditionals, clearEndpoints, conditional, conditionals, description, description, findAction, findAction, findActions, findAttribute, findComponent, findComponent, findComponents, findEndpoint, findEndpoint, findEndpoints, get, get, getAction, getAction, getActions, getActionsList, getAttribute, getAttribute, getAttributes, getAugmentationKey, getClassifier, getComponent, getComponent, getComponents, getComponentsList, getConditionals, getDescription, getEndpoint, getEndpoint, getEndpoints, getEndpointsList, getId, getLabel, getOrder, getScope, getType, hasAction, hasAttribute, hasComponent, hasEndpoint, id, isAugmentable, isTranslatable, label, label, notTranslatable, order, removeAction, removeAttribute, removeComponent, removeEndpoint, scope, self, setActions, setAttributes, setAugmentationKey, setClassifier, setComponents, setConditionals, setDescription, setEndpoints, setId, setLabel, setOrder, setScope, setTranslatable, setType, translatable, translatable, type
-
Method Details
-
idKey
Define the property used as the unique identifier for the data in a row. Defaults to "id" in the client.- Parameters:
idKey- the id field- Returns:
- this
-
addColumns
Adds a collection of columns to this grid.- Parameters:
columns- the columns to add- Returns:
- this
-
addColumn
Adds a column with the given property name to this grid.- Parameters:
name- the name of the propertycolumn- the column- Returns:
- this
-
addColumn
Adds a column to this grid.- Parameters:
column- the column- Returns:
- this
-
addColumn
Adds a string column with the given name to this grid. Capitalizes the provided name as the label for the column.- Parameters:
name- the name of the property- Returns:
- this
-
removeColumn
Removes the column with the given name.- Parameters:
name- the column name- Returns:
- this
-
getColumn
Retrieves the column with the given property name, if it exists.- Parameters:
name- the name of the property- Returns:
- the column
- Throws:
IllegalArgumentException- if no component is found with that key
-
findColumn
Finds the column with the given property name.- Parameters:
name- the name of the property- Returns:
- an optional with the column, or empty
-