use of com.qcadoo.model.api.search.CustomRestriction in project qcadoo by qcadoo.
the class ViewDictionaryService method addRestrictionToDictionariesGrid.
public void addRestrictionToDictionariesGrid(final ViewDefinitionState viewDefinitionState) {
GridComponent grid = (GridComponent) viewDefinitionState.getComponentByReference(QcadooViewConstants.L_GRID);
grid.setCustomRestriction(new CustomRestriction() {
@Override
public void addRestriction(final SearchCriteriaBuilder searchCriteriaBuilder) {
searchCriteriaBuilder.add(SearchRestrictions.eq("active", true));
}
});
}
Aggregations