- java.lang.Object
-
- org.omnifaces.util.selectitems.SelectItemsBuilder
-
public class SelectItemsBuilder extends Object
Helper class to build an array of SelectItems using various means, like via the builder pattern or a givenMap.- Author:
- Arjan Tijms
-
-
Constructor Summary
Constructors Constructor Description SelectItemsBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SelectItemsBuilderadd(Object value, String label)SelectItem[]build()List<SelectItem>buildList()static List<SelectItem>fromMap(Map<?,?> map)Builds aListofSelectItems from the givenMapargument.
-
-
-
Method Detail
-
add
public SelectItemsBuilder add(Object value, String label)
-
build
public SelectItem[] build()
-
buildList
public List<SelectItem> buildList()
-
fromMap
public static List<SelectItem> fromMap(Map<?,?> map)
Builds aListofSelectItems from the givenMapargument.- Parameters:
map- the Map- Returns:
ListofSelectItems having the map's value as value and the map's key as label.
-
-