Search in sources :

Example 1 with GroupFilter

use of io.jmix.ui.component.GroupFilter in project jmix by jmix-framework.

the class GroupFilterConverter method convertToComponent.

@Override
public GroupFilter convertToComponent(GroupFilterCondition model) {
    GroupFilter groupFilter = super.convertToComponent(model);
    groupFilter.setOperation(model.getOperation());
    groupFilter.setCaption(model.getCaption());
    groupFilter.setOperationCaptionVisible(model.getOperationCaptionVisible());
    if (model.getOwnFilterConditions() != null) {
        for (FilterCondition ownFilterCondition : model.getOwnFilterConditions()) {
            FilterConverter ownFilterConverter = filterComponents.getConverterByModelClass(ownFilterCondition.getClass(), filter);
            groupFilter.add(ownFilterConverter.convertToComponent(ownFilterCondition));
        }
    }
    return groupFilter;
}
Also used : FilterCondition(io.jmix.ui.entity.FilterCondition) GroupFilterCondition(io.jmix.ui.entity.GroupFilterCondition) GroupFilter(io.jmix.ui.component.GroupFilter) FilterConverter(io.jmix.ui.component.filter.converter.FilterConverter)

Aggregations

GroupFilter (io.jmix.ui.component.GroupFilter)1 FilterConverter (io.jmix.ui.component.filter.converter.FilterConverter)1 FilterCondition (io.jmix.ui.entity.FilterCondition)1 GroupFilterCondition (io.jmix.ui.entity.GroupFilterCondition)1