com.smartgwt.client.docs

## 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:

  - The form was previously passed AdvancedCriteria via `setValuesAsCriteria()`
  - The form has a specified `operator` of `"or"`
  - `FormItem.hasAdvancedCriteria` returns true for some item(s) within the form

  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.

  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:
    `DynamicForm.getValuesAsCriteria()`, `DynamicForm.setValuesAsCriteria(com.smartgwt.client.data.Criterion)`, `DynamicForm.getValuesAsAdvancedCriteria()`, `FormItem.hasAdvancedCriteria()`, `FormItem.canEditCriterion(com.smartgwt.client.data.Criterion)`, `FormItem.getCriterion()`, `FormItem.setCriterion(com.smartgwt.client.data.Criterion)`, `CanvasItem.hasAdvancedCriteria()`, `FormItem.canEditCriterion(com.smartgwt.client.data.Criterion)`, `FormItem.getCriterion()`, `FormItem.setCriterion(com.smartgwt.client.data.Criterion)`, `ComboBoxItem.hasAdvancedCriteria()`, `FormItem.getCriterion()`, `FormItem.canEditCriterion(com.smartgwt.client.data.Criterion)`, `FormItem.setCriterion(com.smartgwt.client.data.Criterion)`, `DateRangeItem.hasAdvancedCriteria()`, `FormItem.getCriterion()`, `FormItem.canEditCriterion(com.smartgwt.client.data.Criterion)`, `FormItem.setCriterion(com.smartgwt.client.data.Criterion)`, `MiniDateRangeItem.hasAdvancedCriteria()`, `FormItem.getCriterion()`, `FormItem.setCriterion(com.smartgwt.client.data.Criterion)`, `FormItem.canEditCriterion(com.smartgwt.client.data.Criterion)`, `FormItem.getOperator()`