Interface CriteriaEditing


public interface CriteriaEditing

Criteria Editing

DynamicForms may be used to edit Criteria or AdvancedCriteria for filtering data from a DataSource.

The main APIs for this are DynamicForm.getValuesAsCriteria() and DynamicForm.setValuesAsCriteria().

getValuesAsCriteria() will return an AdvancedCriteria object in the following cases:

Note that at the form item level, individual items can support editing of advanced criteria by registering FormItemCanEditCriterionPredicate, FormItemCriterionSetter, and FormItemCriterionGetter objects to implement the methods canEditCriterion(), setCriterion(), and getCriterion(), respectively.

There is also built-in support for expression-parsing in DynamicForms. This allows expressions, like '>5' (greater than 5) or 'a...c' (between a and c) to be edited and generated automatically by appropriate formItems.

Some FormItems have special behavior - for instance, a SelectItem with multiple:true will successfully edit and return criteria with an inSet operator.

The common pattern of using nested dynamicForms to edit arbitrary advanced criteria has been implemented via overrides to these methods in the CanvasItem class. See CanvasItem.setCriterionGetter() for details.

For completely user-driven advanced criteria editing see also the FilterBuilder class.

See Also: