Package io.jmix.ui.component
Interface PropertyFilter<V>
- Type Parameters:
V- value type
- All Superinterfaces:
Component,Component.BelongToFrame,Component.Editable,Component.Focusable,Component.HasCaption,Component.HasDescription,Component.HasIcon,FilterComponent,HasContextHelp,HasHtmlCaption,HasHtmlDescription,HasHtmlSanitizer,HasValue<V>,Requirable,SingleFilterComponent<V>,SupportsCaptionPosition,Validatable
- All Known Implementing Classes:
PropertyFilterImpl
@StudioComponent(caption="PropertyFilter",
category="Components",
xmlElement="propertyFilter",
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/vcl/components/filter-components.html#property-filter",
canvasBehaviour=PROPERTY_FILTER,
icon="io/jmix/ui/icon/component/filter.svg")
public interface PropertyFilter<V>
extends SingleFilterComponent<V>
PropertyFilter is a UI component used for filtering entities returned by the
DataLoader. The component is
related to entity property and can automatically render proper layout for setting a condition value. In general case
a PropertyFilter layout contains a label with entity property caption, operation label or selector (=, contains,
>, etc.) and a field for editing a property value.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumOperation representing corresponding filtering condition.static classEvent sent when theoperationproperty is changed.Nested classes/interfaces inherited from interface io.jmix.ui.component.Component
Component.Alignment, Component.BelongToFrame, Component.Disposable, Component.Editable, Component.Focusable, Component.HasCaption, Component.HasDescription, Component.HasIcon, Component.HasXmlDescriptor, Component.WrapperNested classes/interfaces inherited from interface io.jmix.ui.component.HasContextHelp
HasContextHelp.ContextHelpIconClickEventNested classes/interfaces inherited from interface io.jmix.ui.component.HasValue
HasValue.ValueChangeEvent<V>Nested classes/interfaces inherited from interface io.jmix.ui.component.SupportsCaptionPosition
SupportsCaptionPosition.CaptionPosition -
Field Summary
FieldsFields inherited from interface io.jmix.ui.component.Component
AUTO_SIZE, AUTO_SIZE_PX, FULL_SIZE -
Method Summary
Modifier and TypeMethodDescriptionAdds a listener that is invoked when theoperationproperty changes.booleanbooleanvoidsetOperation(PropertyFilter.Operation operation) Sets a filtering operation.voidsetOperationCaptionVisible(boolean operationCaptionVisible) Sets whether to show operation caption.voidsetOperationEditable(boolean operationEditable) Sets whether an operation selector is visible.voidsetProperty(String property) Sets related entity property name.Methods inherited from interface io.jmix.ui.component.Component
addStyleName, getAlignment, getHeight, getHeightSizeUnit, getId, getParent, getStyleName, getWidth, getWidthSizeUnit, isEnabled, isEnabledRecursive, isResponsive, isVisible, isVisibleRecursive, removeStyleName, setAlignment, setEnabled, setHeight, setHeightAuto, setHeightFull, setId, setParent, setResponsive, setSizeAuto, setSizeFull, setStyleName, setVisible, setWidth, setWidthAuto, setWidthFull, unwrap, unwrapComposition, unwrapCompositionOrNull, unwrapOrNull, withUnwrapped, withUnwrappedCompositionMethods inherited from interface io.jmix.ui.component.Component.BelongToFrame
getFrame, setFrameMethods inherited from interface io.jmix.ui.component.Component.Editable
isEditable, isEditableWithParent, setEditableMethods inherited from interface io.jmix.ui.component.Component.Focusable
focus, getTabIndex, isFocusable, setFocusable, setTabIndexMethods inherited from interface io.jmix.ui.component.Component.HasCaption
getCaption, setCaptionMethods inherited from interface io.jmix.ui.component.Component.HasDescription
getDescription, setDescriptionMethods inherited from interface io.jmix.ui.component.Component.HasIcon
getIcon, setIcon, setIconFromSetMethods inherited from interface io.jmix.ui.component.FilterComponent
apply, getDataLoader, isAutoApply, isConditionModificationDelegated, setAutoApply, setConditionModificationDelegated, setDataLoaderMethods inherited from interface io.jmix.ui.component.HasContextHelp
getContextHelpIconClickHandler, getContextHelpText, isContextHelpTextHtmlEnabled, setContextHelpIconClickHandler, setContextHelpText, setContextHelpTextHtmlEnabledMethods inherited from interface io.jmix.ui.component.HasHtmlCaption
isCaptionAsHtml, setCaptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlDescription
isDescriptionAsHtml, setDescriptionAsHtmlMethods inherited from interface io.jmix.ui.component.HasHtmlSanitizer
isHtmlSanitizerEnabled, setHtmlSanitizerEnabledMethods inherited from interface io.jmix.ui.component.HasValue
addValueChangeListener, clear, getEmptyValue, getValue, isEmpty, setValueMethods inherited from interface io.jmix.ui.component.Requirable
getRequiredMessage, isRequired, setRequired, setRequiredMessageMethods inherited from interface io.jmix.ui.component.SingleFilterComponent
getCaptionWidth, getCaptionWidthSizeUnit, getParameterName, getValueComponent, isCaptionVisible, setCaptionVisible, setCaptionWidth, setParameterName, setValueComponentMethods inherited from interface io.jmix.ui.component.SupportsCaptionPosition
getCaptionPosition, setCaptionPositionMethods inherited from interface io.jmix.ui.component.Validatable
isValid, isValidateOnCommit, validate
-
Field Details
-
NAME
- See Also:
-
-
Method Details
-
getQueryCondition
PropertyCondition getQueryCondition()- Specified by:
getQueryConditionin interfaceFilterComponent- Returns:
- a
PropertyConditionrelated to the current property filter
-
getProperty
String getProperty()- Returns:
- related entity property name
-
setProperty
@StudioProperty(type=PROPERTY_PATH_REF, required=true, typeParameter="V") void setProperty(String property) Sets related entity property name.- Parameters:
property- entity property name
-
getOperation
PropertyFilter.Operation getOperation()- Returns:
- a filtering operation
-
setOperation
Sets a filtering operation.- Parameters:
operation- a filtering operation
-
isOperationEditable
boolean isOperationEditable()- Returns:
- whether an operation selector is visible.
-
setOperationEditable
Sets whether an operation selector is visible.- Parameters:
operationEditable- whether an operation selector is visible
-
isOperationCaptionVisible
boolean isOperationCaptionVisible()- Returns:
- whether to show operation caption
-
setOperationCaptionVisible
@StudioProperty(defaultValue="true") void setOperationCaptionVisible(boolean operationCaptionVisible) Sets whether to show operation caption.- Parameters:
operationCaptionVisible- whether to show operation caption
-
addOperationChangeListener
Adds a listener that is invoked when theoperationproperty changes.- Parameters:
listener- a listener to add- Returns:
- a registration object for removing an event listener
-