public final class SelectItemsUtils extends Object
SelectItem
or data represented by them.Modifier and Type | Method and Description |
---|---|
static List<Object> |
collectAllValuesFromSelectItems(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component)
Collects all values associated with all
SelectItem instances associated with the given component. |
static Object |
findValueByStringConversion(jakarta.faces.context.FacesContext context,
jakarta.faces.component.UIComponent component,
String value,
jakarta.faces.convert.Converter<Object> converter)
Finds an object value in the
SelectItem instances associated with the given component by means of matching its converted value with
the given string value. |
public static Object findValueByStringConversion(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component, String value, jakarta.faces.convert.Converter<Object> converter)
SelectItem
instances associated with the given component by means of matching its converted value with
the given string value.context
- The involved faces context.component
- the component with which SelectItem
s should be associated that are used to search in.value
- a string that should match the string representation of one of the values held by the SelectItem
s.converter
- the faces Converter
used to generate String representations for the values held by the SelectItem
s.public static List<Object> collectAllValuesFromSelectItems(jakarta.faces.context.FacesContext context, jakarta.faces.component.UIComponent component)
SelectItem
instances associated with the given component.
Note that values from recursively scanned SelectItemGroup
instances are included.
context
- The involved faces context.component
- the component with which SelectItem
instances should be associatedSelectItem
instancesCopyright © 2012–2020 OmniFaces. All rights reserved.