Search in sources :

Example 1 with ListStore

use of com.sencha.gxt.data.shared.ListStore 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));
}
Also used : ListStore(com.sencha.gxt.data.shared.ListStore) ListFilter(com.sencha.gxt.widget.core.client.grid.filters.ListFilter) EnumItem(org.activityinfo.model.type.enumerated.EnumItem)

Aggregations

ListStore (com.sencha.gxt.data.shared.ListStore)1 ListFilter (com.sencha.gxt.widget.core.client.grid.filters.ListFilter)1 EnumItem (org.activityinfo.model.type.enumerated.EnumItem)1