Package org.openfaces.component.filter

Examples of org.openfaces.component.filter.FilterCondition


    }

    private void setCondition(ExpressionFilter filter, String value) {
        String[] parts = value.split(" ");
        String conditionName = parts[parts.length - 1];
        FilterCondition condition = null;
        String possibleConditionsStr = "";
        for (FilterCondition c : FilterCondition.values()) {
            if (c == FilterCondition.EMPTY || c == FilterCondition.BETWEEN)
                continue; // these are not applicable for one-property filters (which are ancestors of ExpressionFilter)
            if (possibleConditionsStr.length() > 0)
View Full Code Here


    }

    protected ExpressionFilterCriterion createDefaultCriterion(ExpressionFilter filter, Object specifiedValue) {
        Object expression = filter.getExpression();
        PropertyLocator propertyLocator = filter.getPropertyLocator();
        FilterCondition condition;

        boolean inverse = false;
        ExpressionFilterCriterion defaultCriterion = filter.getCondition();
        if (defaultCriterion != null) {
            condition = defaultCriterion.getCondition();
            inverse = defaultCriterion.isInverse();
        } else {
            FilterCondition forcedCondition = getForceDefaultCondition(filter);
            if (forcedCondition != null)
                condition = forcedCondition;
            else {
                UIComponent parent = filter.getParent();
                if (parent == null || !(parent instanceof BaseColumn))
View Full Code Here

        if (propertyModified || property == null || operationSelector == null || inverseCheckBox == null) {
            operation = null;
            parametersEditor = null;
            return null;
        }
        FilterCondition newOperation = (FilterCondition) operationSelector.getValue();
        inverse = (Boolean) inverseCheckBox.getValue();
        boolean operationModified = newOperation == null ? operation == null : !newOperation.equals(operation);
        operation = newOperation;
        if (operation == null || parametersEditor == null) {
            parametersEditor = null;
            return null;
        }
View Full Code Here

        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;
View Full Code Here

TOP

Related Classes of org.openfaces.component.filter.FilterCondition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.