Class SelectItemsUtil
java.lang.Object
org.apache.myfaces.core.api.shared.SelectItemsUtil
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic List<SelectItem>
collectSelectItems
(FacesContext context, UIComponent component) static <S extends SelectItem>
ScreateSelectItem
(UIComponent component, Object value, Supplier<S> supplier) static <S extends SelectItem>
ScreateSelectItem
(UISelectItem uiSelectItem, Supplier<S> supplier) static <S extends SelectItem>
voidcreateSelectItems
(FacesContext context, UISelectItems component, Object values, Supplier<S> supplier, Consumer<S> callback) static boolean
isNoSelectionOption
(FacesContext context, UIComponent uiComponent, Object value, Iterator<SelectItem> iterator, Converter converter) static boolean
matchValue
(FacesContext context, UIComponent uiComponent, Object value, Iterator<SelectItem> iterator, Converter converter) static SelectItem
updateSelectItem
(UISelectItems uiSelectItems, SelectItem value)
-
Field Details
-
ATTR_ITEM_VALUE
- See Also:
-
ATTR_ITEM_LABEL
- See Also:
-
ATTR_ITEM_DESCRIPTION
- See Also:
-
ATTR_ITEM_DISABLED
- See Also:
-
ATTR_ITEM_LABEL_ESCAPED
- See Also:
-
ATTR_NO_SELECTION_VALUE
- See Also:
-
ATTR_NO_SELECTION_OPTION
- See Also:
-
ATTR_VAR
- See Also:
-
-
Constructor Details
-
SelectItemsUtil
public SelectItemsUtil()
-
-
Method Details
-
createSelectItem
public static <S extends SelectItem> S createSelectItem(UISelectItem uiSelectItem, Supplier<S> supplier) -
createSelectItem
public static <S extends SelectItem> S createSelectItem(UIComponent component, Object value, Supplier<S> supplier) -
updateSelectItem
-
collectSelectItems
-
createSelectItems
public static <S extends SelectItem> void createSelectItems(FacesContext context, UISelectItems component, Object values, Supplier<S> supplier, Consumer<S> callback) -
matchValue
public static boolean matchValue(FacesContext context, UIComponent uiComponent, Object value, Iterator<SelectItem> iterator, Converter converter) - Parameters:
context
- the faces contextuiComponent
- the component instancevalue
- the value to checkconverter
- a converter instanceiterator
- contains instances of SelectItem- Returns:
- if the value of a selectitem is equal to the given value
-
isNoSelectionOption
public static boolean isNoSelectionOption(FacesContext context, UIComponent uiComponent, Object value, Iterator<SelectItem> iterator, Converter converter) - Parameters:
context
- the faces contextuiComponent
- the component instancevalue
- the value to checkconverter
-iterator
- contains instances of SelectItem- Returns:
- if the value is a SelectItem of selectItemsIter, on which noSelectionOption is true
-