use of com.sencha.gxt.widget.core.client.grid.filters.ListFilter in project activityinfo by bedatadriven.
the class ColumnModelBuilder method addEnumFilter.
private void addEnumFilter(String path, EffectiveTableColumn columnModel, EnumType enumType) {
ListStore<EnumItemViewModel> store = new ListStore<>(x -> x.getId());
for (EnumItem enumItem : enumType.getValues()) {
store.add(new EnumItemViewModel(enumItem));
}
ListFilter<Integer, EnumItemViewModel> filter = new ListFilter<>(new NullValueProvider<>(path), store);
filter.setUseStoreKeys(true);
filters.add(new ColumnView(columnModel.getFormula(), filter));
}
Aggregations