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
FilterComponents 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.OperationNested classes/interfaces inherited from interface io.jmix.flowui.component.SupportsResponsiveSteps
SupportsResponsiveSteps.ResponsiveStep -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.ApplicationContextprotected booleanprotected booleanprotected com.vaadin.flow.component.formlayout.FormLayoutprotected DataLoaderprotected Map<FilterComponent,com.vaadin.flow.component.formlayout.FormLayout.FormItem> protected static final Stringprotected Conditionprotected LogicalFilterSupportprotected LogicalFilterComponent.Operationprotected booleanprotected List<FilterComponent>protected LogicalConditionprotected List<SupportsResponsiveSteps.ResponsiveStep>protected com.vaadin.flow.component.html.Labelprotected Stringprotected UiComponents -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(FilterComponent filterComponent) Adds aFilterComponentto the component.com.vaadin.flow.shared.RegistrationaddFilterComponentsChangeListener(com.vaadin.flow.component.ComponentEventListener<LogicalFilterComponent.FilterComponentsChangeEvent<GroupFilter>> listener) protected voidaddFilterComponentToConditionsLayout(com.vaadin.flow.component.formlayout.FormLayout conditionsLayout, FilterComponent filterComponent) voidvoidapply()Applies the current filter component condition.protected voidprotected com.vaadin.flow.component.formlayout.FormLayoutprotected com.vaadin.flow.component.html.Labelprotected voidGet the list ofSupportsResponsiveSteps.ResponsiveSteps used to configure this layout.protected voidprotected voidinitConditionsLayout(com.vaadin.flow.component.formlayout.FormLayout layout) protected com.vaadin.flow.component.orderedlayout.VerticalLayoutprotected voidprotected voidprotected voidinitSummaryComponent(com.vaadin.flow.component.html.Label summaryComponent) protected booleanbooleanbooleanbooleanvoidremove(FilterComponent filterComponent) Removes aFilterComponentfrom the component.voidRemoves all filter components from the component.voidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidsetAutoApply(boolean autoApply) Sets whether the filter component should be automatically applied to theDataLoaderwhen the value component value is changed.voidsetConditionModificationDelegated(boolean conditionModificationDelegated) Sets whether the modification ofDataLoadercondition is delegated to the ownerFilterComponentorGenericFilter.voidsetDataLoader(DataLoader dataLoader) Sets aDataLoaderrelated to the current filter component.voidsetOperation(LogicalFilterComponent.Operation operation) Sets a filtering operation.voidsetOperationTextVisible(boolean operationTextVisible) Sets whether to show operation caption.voidConfigure the responsive steps used in this layout.voidsetSummaryText(String summaryText) protected voidprotected voidprotected voidprotected voidMethods inherited from class com.vaadin.flow.component.Composite
getChildren, getContent, getElementMethods 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, scrollIntoView, set, setElement, setId, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods 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.Label 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:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
autowireDependencies
protected void autowireDependencies() -
initContent
protected com.vaadin.flow.component.orderedlayout.VerticalLayout initContent()- Overrides:
initContentin 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:
getDataLoaderin interfaceFilterComponent- Returns:
- a
DataLoaderrelated to the current filter component
-
setDataLoader
Description copied from interface:FilterComponentSets aDataLoaderrelated to the current filter component.- Specified by:
setDataLoaderin interfaceFilterComponent- Parameters:
dataLoader- aDataLoaderto set
-
updateDataLoaderCondition
protected void updateDataLoaderCondition() -
isAutoApply
public boolean isAutoApply()- Specified by:
isAutoApplyin interfaceFilterComponent- Returns:
trueif the filter component should be automatically applied to theDataLoaderwhen the value component value is changed
-
setAutoApply
public void setAutoApply(boolean autoApply) Description copied from interface:FilterComponentSets whether the filter component should be automatically applied to theDataLoaderwhen the value component value is changed.- Specified by:
setAutoApplyin interfaceFilterComponent- Parameters:
autoApply-trueif the filter component should be automatically applied to theDataLoaderwhen the value component value is changed
-
apply
public void apply()Description copied from interface:FilterComponentApplies the current filter component condition.- Specified by:
applyin interfaceFilterComponent
-
getQueryCondition
- Specified by:
getQueryConditionin interfaceFilterComponent- Specified by:
getQueryConditionin interfaceLogicalFilterComponent<GroupFilter>- Returns:
- a
LogicalConditionrelated to the current component
-
updateQueryCondition
protected void updateQueryCondition() -
add
Description copied from interface:LogicalFilterComponentAdds aFilterComponentto the component. Updates the currentLogicalConditionby adding aConditionfrom theFilterComponent.- Specified by:
addin interfaceLogicalFilterComponent<GroupFilter>- Parameters:
filterComponent- aFilterComponentto add- See Also:
-
updateConditionsLayout
protected void updateConditionsLayout() -
remove
Description copied from interface:LogicalFilterComponentRemoves aFilterComponentfrom the component. Updates the currentLogicalCondition.- Specified by:
removein interfaceLogicalFilterComponent<GroupFilter>- Parameters:
filterComponent- aFilterComponentto remove
-
removeAll
public void removeAll()Description copied from interface:LogicalFilterComponentRemoves all filter components from the component. Resets the currentLogicalCondition.- Specified by:
removeAllin interfaceLogicalFilterComponent<GroupFilter>
-
getSummaryText
-
setSummaryText
-
updateSummaryText
protected void updateSummaryText() -
createSummaryComponent
protected com.vaadin.flow.component.html.Label createSummaryComponent() -
initSummaryComponent
protected void initSummaryComponent(com.vaadin.flow.component.html.Label summaryComponent) -
getOperation
- Specified by:
getOperationin interfaceLogicalFilterComponent<GroupFilter>- Returns:
- a filtering operation
-
setOperation
Description copied from interface:LogicalFilterComponentSets a filtering operation.- Specified by:
setOperationin interfaceLogicalFilterComponent<GroupFilter>- Parameters:
operation- a filtering operation
-
isOperationTextVisible
public boolean isOperationTextVisible()- Specified by:
isOperationTextVisiblein interfaceLogicalFilterComponent<GroupFilter>- Returns:
- whether to show operation caption
-
setOperationTextVisible
public void setOperationTextVisible(boolean operationTextVisible) Description copied from interface:LogicalFilterComponentSets whether to show operation caption.- Specified by:
setOperationTextVisiblein interfaceLogicalFilterComponent<GroupFilter>- Parameters:
operationTextVisible- whether to show operation caption
-
getResponsiveSteps
Description copied from interface:SupportsResponsiveStepsGet the list ofSupportsResponsiveSteps.ResponsiveSteps used to configure this layout.- Specified by:
getResponsiveStepsin interfaceSupportsResponsiveSteps- Returns:
- the list of
SupportsResponsiveSteps.ResponsiveSteps used to configure this layout - See Also:
-
setResponsiveSteps
Description copied from interface:SupportsResponsiveStepsConfigure the responsive steps used in this layout.- Specified by:
setResponsiveStepsin interfaceSupportsResponsiveSteps- Parameters:
steps- list ofSupportsResponsiveSteps.ResponsiveSteps to set- See Also:
-
getOwnFilterComponents
- Specified by:
getOwnFilterComponentsin interfaceLogicalFilterComponent<GroupFilter>- Returns:
- the list of filter components directly owned by the current component
-
getFilterComponents
- Specified by:
getFilterComponentsin interfaceLogicalFilterComponent<GroupFilter>- Returns:
- the list of filter components belonging to the whole components tree below this component
-
isConditionModificationDelegated
public boolean isConditionModificationDelegated()- Specified by:
isConditionModificationDelegatedin interfaceFilterComponent- Returns:
trueif the filter component is located inside theGenericFilterand the modification ofDataLoadercondition is delegated to the ownerFilterComponentorGenericFilter,falseotherwise
-
setConditionModificationDelegated
public void setConditionModificationDelegated(boolean conditionModificationDelegated) Description copied from interface:FilterComponentSets whether the modification ofDataLoadercondition is delegated to the ownerFilterComponentorGenericFilter.- Specified by:
setConditionModificationDelegatedin interfaceFilterComponent- Parameters:
conditionModificationDelegated-trueif the filter component is located inside theGenericFilterand the modification ofDataLoadercondition is delegated to the ownerFilterComponentorGenericFilter,falseotherwise
-
addFilterComponentsChangeListener
public com.vaadin.flow.shared.Registration addFilterComponentsChangeListener(com.vaadin.flow.component.ComponentEventListener<LogicalFilterComponent.FilterComponentsChangeEvent<GroupFilter>> listener) - Specified by:
addFilterComponentsChangeListenerin interfaceLogicalFilterComponent<GroupFilter>
-
fireFilterComponentsChanged
protected void fireFilterComponentsChanged()
-