use of io.jmix.ui.entity.HeaderFilterCondition in project jmix by jmix-framework.
the class PropertyConditionBuilder method createFilterConditionsByPaths.
protected List<FilterCondition> createFilterConditionsByPaths(List<MetaPropertyPath> paths) {
List<FilterCondition> conditions = new ArrayList<>();
HeaderFilterCondition propertiesHeaderCondition = createHeaderFilterCondition(messages.getMessage(PropertyConditionBuilder.class, "propertyConditionBuilder.headerCaption"));
conditions.add(propertiesHeaderCondition);
for (MetaPropertyPath path : paths) {
FilterCondition condition = createFilterConditionByPath(path);
FilterCondition parent = path.isDirectProperty() ? propertiesHeaderCondition : getParentCondition(path, conditions);
condition.setParent(parent);
conditions.add(condition);
}
conditions.sort((condition1, condition2) -> ObjectUtils.compare(condition1.getLocalizedCaption(), condition2.getLocalizedCaption()));
return conditions;
}
Aggregations