String predefinedCriterionsClass = getPredefinedCriterionClass(context, filter);
writeOption(writer, component, PREDEFINED_CRITERION_PREFIX + ALL, allRecordsCriterionName,
currentCriterion == null,
predefinedCriterionsClass);
FilterCondition condition = currentCriterion != null ? currentCriterion.getCondition() : null;
if (thereAreEmptyItems) {
String emptyRecordsCriterionName = filter.getEmptyRecordsText();
writeOption(writer, component, PREDEFINED_CRITERION_PREFIX + EMPTY, emptyRecordsCriterionName,
condition != null && condition.equals(FilterCondition.EMPTY) && !currentCriterion.isInverse(),
predefinedCriterionsClass);
String nonEmptyRecordsCriterionName = filter.getNonEmptyRecordsText();
writeOption(writer, component, PREDEFINED_CRITERION_PREFIX + NON_EMPTY,
nonEmptyRecordsCriterionName,
condition != null && condition.equals(FilterCondition.EMPTY) && currentCriterion.isInverse(),
predefinedCriterionsClass);
}
Converter converter = getConverter(filter);
Object currentCriterionArg = currentCriterion != null ? currentCriterion.getArg1() : null;