Search in sources :

Example 1 with HeaderConditionDescriptor

use of com.haulmont.cuba.gui.components.filter.descriptor.HeaderConditionDescriptor in project cuba by cuba-platform.

the class AddConditionWindow method select.

public void select() {
    Set<Entity> selectedItems = tree.getSelected();
    if (selectedItems.isEmpty()) {
        showNotification(messages.getMainMessage("filter.addCondition.selectCondition"), NotificationType.WARNING);
        return;
    } else {
        for (Entity item : selectedItems) {
            if (item instanceof HeaderConditionDescriptor) {
                showNotification(messages.getMainMessage("filter.addCondition.youSelectedGroup"), NotificationType.WARNING);
                return;
            } else if (isEmbeddedProperty((AbstractConditionDescriptor) item)) {
                showNotification(messages.getMainMessage("filter.addCondition.youSelectedEmbedded"), NotificationType.WARNING);
                return;
            }
        }
    }
    close(COMMIT_ACTION_ID);
}
Also used : Entity(com.haulmont.cuba.core.entity.Entity) AbstractConditionDescriptor(com.haulmont.cuba.gui.components.filter.descriptor.AbstractConditionDescriptor) HeaderConditionDescriptor(com.haulmont.cuba.gui.components.filter.descriptor.HeaderConditionDescriptor)

Aggregations

Entity (com.haulmont.cuba.core.entity.Entity)1 AbstractConditionDescriptor (com.haulmont.cuba.gui.components.filter.descriptor.AbstractConditionDescriptor)1 HeaderConditionDescriptor (com.haulmont.cuba.gui.components.filter.descriptor.HeaderConditionDescriptor)1