Class GroupFilter
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
io.jmix.flowui.component.logicalfilter.GroupFilter
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasEnabled
,com.vaadin.flow.component.HasStyle
,FilterComponent
,LogicalFilterComponent<GroupFilter>
,SupportsResponsiveSteps
,Serializable
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.ApplicationContextAware
public class GroupFilter
extends com.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
implements LogicalFilterComponent<GroupFilter>, SupportsResponsiveSteps, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
This component can contain
FilterComponent
s and can be used for filtering entities
returned by the DataLoader
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.component.logicalfilter.LogicalFilterComponent
LogicalFilterComponent.FilterComponentsChangeEvent<C extends com.vaadin.flow.component.Component & LogicalFilterComponent<C>>, LogicalFilterComponent.Operation
Nested classes/interfaces inherited from interface io.jmix.flowui.component.SupportsResponsiveSteps
SupportsResponsiveSteps.ResponsiveStep
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContext
protected boolean
protected boolean
protected com.vaadin.flow.component.formlayout.FormLayout
protected DataLoader
protected Map<FilterComponent,
com.vaadin.flow.component.formlayout.FormLayout.FormItem> protected static final String
protected Condition
protected LogicalFilterSupport
protected LogicalFilterComponent.Operation
protected boolean
protected List<FilterComponent>
protected LogicalCondition
protected List<SupportsResponsiveSteps.ResponsiveStep>
protected com.vaadin.flow.component.html.Div
protected String
protected UiComponents
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(FilterComponent filterComponent) Adds aFilterComponent
to the component.com.vaadin.flow.shared.Registration
addFilterComponentsChangeListener
(com.vaadin.flow.component.ComponentEventListener<LogicalFilterComponent.FilterComponentsChangeEvent<GroupFilter>> listener) protected void
addFilterComponentToConditionsLayout
(com.vaadin.flow.component.formlayout.FormLayout conditionsLayout, FilterComponent filterComponent) void
void
apply()
Applies the current filter component condition.protected void
protected Condition
protected com.vaadin.flow.component.formlayout.FormLayout
protected com.vaadin.flow.component.html.Div
protected void
Get the list ofSupportsResponsiveSteps.ResponsiveStep
s used to configure this layout.protected com.vaadin.flow.component.html.Div
protected void
protected void
initConditionsLayout
(com.vaadin.flow.component.formlayout.FormLayout layout) protected com.vaadin.flow.component.orderedlayout.VerticalLayout
protected void
protected void
protected void
initSummaryComponent
(com.vaadin.flow.component.html.Div summaryComponent) protected boolean
boolean
boolean
boolean
void
remove
(FilterComponent filterComponent) Removes aFilterComponent
from the component.void
Removes all filter components from the component.void
setApplicationContext
(org.springframework.context.ApplicationContext applicationContext) void
setAutoApply
(boolean autoApply) Sets whether the filter component should be automatically applied to theDataLoader
when the value component value is changed.void
setConditionModificationDelegated
(boolean conditionModificationDelegated) Sets whether the modification ofDataLoader
condition is delegated to the ownerFilterComponent
orGenericFilter
.void
setDataLoader
(DataLoader dataLoader) Sets aDataLoader
related to the current filter component.void
setOperation
(LogicalFilterComponent.Operation operation) Sets a filtering operation.void
setOperationTextVisible
(boolean operationTextVisible) Sets whether to show operation caption.void
Configure the responsive steps used in this layout.void
setSummaryText
(String summaryText) protected void
protected void
protected void
updateDataLoaderInitialCondition
(Condition condition) protected void
protected void
Methods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElement
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
Methods inherited from interface io.jmix.flowui.component.SupportsResponsiveSteps
setResponsiveSteps
-
Field Details
-
GROUP_FILTER_CLASS_NAME
- See Also:
-
applicationContext
protected org.springframework.context.ApplicationContext applicationContext -
uiComponents
-
logicalFilterSupport
-
dataLoader
-
initialDataLoaderCondition
-
autoApply
protected boolean autoApply -
conditionModificationDelegated
protected boolean conditionModificationDelegated -
responsiveSteps
-
summaryComponent
protected com.vaadin.flow.component.html.Div summaryComponent -
summaryText
-
operationTextVisible
protected boolean operationTextVisible -
operation
-
queryCondition
-
ownFilterComponentsOrder
-
conditionsLayout
protected com.vaadin.flow.component.formlayout.FormLayout conditionsLayout -
filterComponentFormItemMap
protected Map<FilterComponent,com.vaadin.flow.component.formlayout.FormLayout.FormItem> filterComponentFormItemMap
-
-
Constructor Details
-
GroupFilter
public GroupFilter()
-
-
Method Details
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContext
in interfaceorg.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
autowireDependencies
protected void autowireDependencies() -
initContent
protected com.vaadin.flow.component.orderedlayout.VerticalLayout initContent()- Overrides:
initContent
in classcom.vaadin.flow.component.Composite<com.vaadin.flow.component.orderedlayout.VerticalLayout>
-
initComponent
protected void initComponent() -
initDefaultResponsiveSteps
protected void initDefaultResponsiveSteps() -
initLayout
protected void initLayout() -
createConditionsLayout
protected com.vaadin.flow.component.formlayout.FormLayout createConditionsLayout() -
initConditionsLayout
protected void initConditionsLayout(com.vaadin.flow.component.formlayout.FormLayout layout) -
isAnyFilterComponentVisible
protected boolean isAnyFilterComponentVisible() -
addFilterComponentToConditionsLayout
protected void addFilterComponentToConditionsLayout(com.vaadin.flow.component.formlayout.FormLayout conditionsLayout, FilterComponent filterComponent) -
getDataLoader
- Specified by:
getDataLoader
in interfaceFilterComponent
- Returns:
- a
DataLoader
related to the current filter component
-
setDataLoader
Description copied from interface:FilterComponent
Sets aDataLoader
related to the current filter component.- Specified by:
setDataLoader
in interfaceFilterComponent
- Parameters:
dataLoader
- aDataLoader
to set
-
updateDataLoaderInitialCondition
-
updateDataLoaderCondition
protected void updateDataLoaderCondition() -
isAutoApply
public boolean isAutoApply()- Specified by:
isAutoApply
in interfaceFilterComponent
- Returns:
true
if the filter component should be automatically applied to theDataLoader
when the value component value is changed
-
setAutoApply
public void setAutoApply(boolean autoApply) Description copied from interface:FilterComponent
Sets whether the filter component should be automatically applied to theDataLoader
when the value component value is changed.- Specified by:
setAutoApply
in interfaceFilterComponent
- Parameters:
autoApply
-true
if the filter component should be automatically applied to theDataLoader
when the value component value is changed
-
apply
public void apply()Description copied from interface:FilterComponent
Applies the current filter component condition.- Specified by:
apply
in interfaceFilterComponent
-
getQueryCondition
- Specified by:
getQueryCondition
in interfaceFilterComponent
- Specified by:
getQueryCondition
in interfaceLogicalFilterComponent<GroupFilter>
- Returns:
- a
LogicalCondition
related to the current component
-
updateQueryCondition
protected void updateQueryCondition() -
add
Description copied from interface:LogicalFilterComponent
Adds aFilterComponent
to the component. Updates the currentLogicalCondition
by adding aCondition
from theFilterComponent
.- Specified by:
add
in interfaceLogicalFilterComponent<GroupFilter>
- Parameters:
filterComponent
- aFilterComponent
to add- See Also:
-
updateConditionsLayout
protected void updateConditionsLayout() -
remove
Description copied from interface:LogicalFilterComponent
Removes aFilterComponent
from the component. Updates the currentLogicalCondition
.- Specified by:
remove
in interfaceLogicalFilterComponent<GroupFilter>
- Parameters:
filterComponent
- aFilterComponent
to remove
-
removeAll
public void removeAll()Description copied from interface:LogicalFilterComponent
Removes all filter components from the component. Resets the currentLogicalCondition
.- Specified by:
removeAll
in interfaceLogicalFilterComponent<GroupFilter>
-
getSummaryComponent
@Nullable protected com.vaadin.flow.component.html.Div getSummaryComponent() -
getSummaryText
-
setSummaryText
-
updateSummaryText
protected void updateSummaryText() -
createSummaryComponent
protected com.vaadin.flow.component.html.Div createSummaryComponent() -
initSummaryComponent
protected void initSummaryComponent(com.vaadin.flow.component.html.Div summaryComponent) -
getOperation
- Specified by:
getOperation
in interfaceLogicalFilterComponent<GroupFilter>
- Returns:
- a filtering operation
-
setOperation
Description copied from interface:LogicalFilterComponent
Sets a filtering operation.- Specified by:
setOperation
in interfaceLogicalFilterComponent<GroupFilter>
- Parameters:
operation
- a filtering operation
-
isOperationTextVisible
public boolean isOperationTextVisible()- Specified by:
isOperationTextVisible
in interfaceLogicalFilterComponent<GroupFilter>
- Returns:
- whether to show operation caption
-
setOperationTextVisible
public void setOperationTextVisible(boolean operationTextVisible) Description copied from interface:LogicalFilterComponent
Sets whether to show operation caption.- Specified by:
setOperationTextVisible
in interfaceLogicalFilterComponent<GroupFilter>
- Parameters:
operationTextVisible
- whether to show operation caption
-
getResponsiveSteps
Description copied from interface:SupportsResponsiveSteps
Get the list ofSupportsResponsiveSteps.ResponsiveStep
s used to configure this layout.- Specified by:
getResponsiveSteps
in interfaceSupportsResponsiveSteps
- Returns:
- the list of
SupportsResponsiveSteps.ResponsiveStep
s used to configure this layout - See Also:
-
setResponsiveSteps
Description copied from interface:SupportsResponsiveSteps
Configure the responsive steps used in this layout.- Specified by:
setResponsiveSteps
in interfaceSupportsResponsiveSteps
- Parameters:
steps
- list ofSupportsResponsiveSteps.ResponsiveStep
s to set- See Also:
-
getOwnFilterComponents
- Specified by:
getOwnFilterComponents
in interfaceLogicalFilterComponent<GroupFilter>
- Returns:
- the list of filter components directly owned by the current component
-
getFilterComponents
- Specified by:
getFilterComponents
in interfaceLogicalFilterComponent<GroupFilter>
- Returns:
- the list of filter components belonging to the whole components tree below this component
-
isConditionModificationDelegated
public boolean isConditionModificationDelegated()- Specified by:
isConditionModificationDelegated
in interfaceFilterComponent
- Returns:
true
if the filter component is located inside theGenericFilter
and the modification ofDataLoader
condition is delegated to the ownerFilterComponent
orGenericFilter
,false
otherwise
-
setConditionModificationDelegated
public void setConditionModificationDelegated(boolean conditionModificationDelegated) Description copied from interface:FilterComponent
Sets whether the modification ofDataLoader
condition is delegated to the ownerFilterComponent
orGenericFilter
.- Specified by:
setConditionModificationDelegated
in interfaceFilterComponent
- Parameters:
conditionModificationDelegated
-true
if the filter component is located inside theGenericFilter
and the modification ofDataLoader
condition is delegated to the ownerFilterComponent
orGenericFilter
,false
otherwise
-
addFilterComponentsChangeListener
public com.vaadin.flow.shared.Registration addFilterComponentsChangeListener(com.vaadin.flow.component.ComponentEventListener<LogicalFilterComponent.FilterComponentsChangeEvent<GroupFilter>> listener) - Specified by:
addFilterComponentsChangeListener
in interfaceLogicalFilterComponent<GroupFilter>
-
copy
-
fireFilterComponentsChanged
protected void fireFilterComponentsChanged()
-