public interface LookupFieldModal<V extends LookupFieldModal<V>> extends Grid<V>, View<V>
LookupField
. This modal renders a list grid
of the lookup's options with optional text and query builder filtering support.Modifier and Type | Interface and Description |
---|---|
static class |
LookupFieldModal.ActionKeys |
static class |
LookupFieldModal.FilterKeys |
static class |
LookupFieldModal.FilterParams |
static class |
LookupFieldModal.FilterPlacements |
static class |
LookupFieldModal.FilterTypes |
Grid.Attributes, Grid.Keys
Modifier and Type | Method and Description |
---|---|
default V |
filterByQueryBuilder()
Configures this modal to support filtering by using a query builder to construct an RSQL
query.
|
default V |
filterByQueryBuilder(UnaryOperator<QueryBuilderFilterAction<?>> fn)
Configures this modal to support filtering by using a query builder to construct an RSQL
query.
|
default V |
filterByTextQuery()
Configures this modal to support filtering by a text query input.
|
default V |
filterByTextQuery(UnaryOperator<FilterAction<?>> fn)
Configures this modal to support filtering by a text query input.
|
default Optional<QueryBuilderFilterAction<?>> |
findFilterByQueryBuilderAction()
Finds the filter action for the filter by query builder.
|
default Optional<FilterAction<?>> |
findFilterByTextQueryAction()
Finds the filter action for the filter by text query.
|
default V |
notFilterByQueryBuilder()
Disables filtering by the query builder for this modal.
|
default V |
notFilterByTextQuery()
Disables filtering by text query for this modal.
|
default V |
removeQueryFilter(String filterKey)
Remove the filter action placed as a
LookupFieldModal.FilterPlacements.QUERY_FILTER with the filter
key. |
addColumn, addColumn, addColumn, addColumns, findColumn, getColumn, idKey, removeColumn
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
compareTo
default V filterByTextQuery()
This method will configure include the text query as a query parameter named
LookupFieldModal.FilterParams.QUERY
, for example:
/products?q=shirt
default V filterByTextQuery(UnaryOperator<FilterAction<?>> fn)
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..."));
fn
- the function to customize the filter actiondefault Optional<FilterAction<?>> findFilterByTextQueryAction()
default V notFilterByTextQuery()
LookupFieldModal.FilterParams.QUERY
.default V removeQueryFilter(String filterKey)
LookupFieldModal.FilterPlacements.QUERY_FILTER
with the filter
key.filterKey
- the filter keydefault V filterByQueryBuilder()
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'
default V filterByQueryBuilder(UnaryOperator<QueryBuilderFilterAction<?>> fn)
This method provides the opportunity to further customize the query builder filter action, for example:
modal.filterByQueryBuilder(filter -> filter.addField("name").addField("url"));
default Optional<QueryBuilderFilterAction<?>> findFilterByQueryBuilderAction()
default V notFilterByQueryBuilder()
LookupFieldModal.FilterParams.QUERY_BUILDER
.Copyright © 2021. All rights reserved.