use of org.uberfire.ext.widgets.common.client.select.SelectOptionImpl in project kie-wb-common by kiegroup.
the class CategoryUtils method createCategories.
/**
* Create a list of SelectOptions with all the categories and the ALL Option, to be used
* in {@link SelectComponent}
* @return the list of SelectOptions
*/
public List<SelectOption> createCategories() {
List<SelectOption> options = new ArrayList<>();
options.add(new SelectOptionImpl("ALL", ts.getTranslation(LibraryConstants.ALL)));
options.addAll(categoriesManagerCache.getCategories().stream().map(category -> new SelectOptionImpl(category.getName(), ts.getTranslation(category.getName()))).collect(Collectors.toList()));
return options;
}
Aggregations