Interface LookupFieldModal<V extends LookupFieldModal<V>>
- All Superinterfaces:
Comparable<V>
,Component<V>
,Copyable<V>
,CustomCssComponent<V>
,Grid<V>
,Serializable
,View<V>
- All Known Implementing Classes:
DefaultLookupFieldModal
Represents the metadata for the modal used by
LookupField
. This modal renders a list grid
of the lookup's options with optional text and query builder filtering support.- Author:
- Alexander Han (yichenhan)
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final class
static final class
static final class
static final class
static final class
Nested classes/interfaces inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.Grid
Grid.Attributes, Grid.Keys
-
Field Summary
Fields inherited from interface com.broadleafcommerce.metadata.dsl.core.CustomCssComponent
CSS_ATTRIBUTE
-
Method Summary
Modifier and TypeMethodDescriptiondefault V
Configures this modal to support filtering by using a query builder to construct an RSQL query.default V
Configures this modal to support filtering by using a query builder to construct an RSQL query.default V
Configures this modal to support filtering by a text query input.default V
Configures this modal to support filtering by a text query input.default Optional<QueryBuilderFilterAction<?>>
Finds the filter action for the filter by query builder.default Optional<FilterAction<?>>
Finds the filter action for the filter by text query.default V
Disables filtering by the query builder for this modal.default V
Disables filtering by text query for this modal.default V
removeQueryFilter
(String filterKey) Remove the filter action placed as aLookupFieldModal.FilterPlacements.QUERY_FILTER
with the filter key.Methods inherited from interface java.lang.Comparable
compareTo
Methods 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, findAttribute, findComponent, findComponent, findComponents, findEndpoint, 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
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.CustomCssComponent
addCssClass, addCssClass, addCssClass, clearCssClasses, getCssClasses, removeCssClass, removeCssClass, removeCssClass
Methods inherited from interface com.broadleafcommerce.metadata.dsl.core.extension.Grid
addColumn, addColumn, addColumn, addColumns, addRowMessage, addRowMessage, findColumn, findRowMessage, getColumn, getRowMessage, idKey, removeColumn, removeRowMessage, rowMessage
-
Method Details
-
filterByTextQuery
Configures this modal to support filtering by a text query input.This method will configure include the text query as a query parameter named
LookupFieldModal.FilterParams.QUERY
, for example:/products?q=shirt
- Returns:
- this
-
filterByTextQuery
Configures this modal to support filtering by a text query input.This method will include the text query as a query parameter named
LookupFieldModal.FilterParams.QUERY
, for example:/products?q=shirt
This method provides the opportunity to further customize the query filter action, for example:
modal.filterByTextQuery(filter -> filter.label("Type your search here..."));
- Parameters:
fn
- the function to customize the filter action- Returns:
- this
-
findFilterByTextQueryAction
Finds the filter action for the filter by text query.- Returns:
- an optional with the action or empty
-
notFilterByTextQuery
Disables filtering by text query for this modal. This will remove the action and query parameter namedLookupFieldModal.FilterParams.QUERY
.- Returns:
- this
-
removeQueryFilter
Remove the filter action placed as aLookupFieldModal.FilterPlacements.QUERY_FILTER
with the filter key.- Parameters:
filterKey
- the filter key- Returns:
- this
-
filterByQueryBuilder
Configures this modal to support filtering by using a query builder to construct an RSQL query.This method will cause the endpoint to include the rsql query as a query parameter named
LookupFieldModal.FilterParams.QUERY_BUILDER
, for example:/products?cq=name=eq='shirt'
- Returns:
- this
-
filterByQueryBuilder
Configures this modal to support filtering by using a query builder to construct an RSQL query.This method provides the opportunity to further customize the query builder filter action, for example:
modal.filterByQueryBuilder(filter -> filter.addField("name").addField("url"));
- Returns:
- this
-
findFilterByQueryBuilderAction
Finds the filter action for the filter by query builder.- Returns:
- an optional with the action or empty
-
notFilterByQueryBuilder
Disables filtering by the query builder for this modal. This will remove the action and query parameter namedLookupFieldModal.FilterParams.QUERY_BUILDER
.- Returns:
- this
-