Search in sources :

Example 1 with FilterSqlService

use of com.axelor.studio.service.filter.FilterSqlService in project axelor-open-suite by axelor.

the class FilterController method updateTargetType.

public void updateTargetType(ActionRequest request, ActionResponse response) throws AxelorException {
    Filter filter = request.getContext().asType(Filter.class);
    FilterSqlService filterSqlService = Beans.get(FilterSqlService.class);
    if (filter.getTargetField() == null)
        return;
    StringBuilder parent = new StringBuilder("self");
    String targetType = filterSqlService.getTargetType(filterSqlService.getTargetField(parent, filter, null, false));
    response.setValue("targetType", targetType);
    response.setValue("filterOperator", null);
}
Also used : FilterSqlService(com.axelor.studio.service.filter.FilterSqlService) Filter(com.axelor.studio.db.Filter)

Aggregations

Filter (com.axelor.studio.db.Filter)1 FilterSqlService (com.axelor.studio.service.filter.FilterSqlService)1