public final class SelectItemsCollector
extends java.lang.Object
SelectItem instances from various sources.| Modifier and Type | Method and Description |
|---|---|
static java.util.List<javax.faces.model.SelectItem> |
collectFromParent(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent parent)
This method gets all select items that are expressed via
UISelectItem or UISelectItems
children of the given parent component. |
static java.util.List<javax.faces.model.SelectItem> |
collectFromUISelectItemsIterator(javax.faces.context.FacesContext facesContext,
javax.faces.component.UISelectItems uiSelectItems,
java.lang.Iterable<?> items)
This method runs the algorithm expressed by a
UISelectItems |
public static java.util.List<javax.faces.model.SelectItem> collectFromParent(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent parent)
UISelectItem or UISelectItems
children of the given parent component.
Note that if SelectItemGroup instances are present then those will be inserted directly in the returned list
and the using code still has to iterate over its children recursively to obtain all separate SelectItem instances.
parent - the parent whose children are scannedcontext - public static java.util.List<javax.faces.model.SelectItem> collectFromUISelectItemsIterator(javax.faces.context.FacesContext facesContext,
javax.faces.component.UISelectItems uiSelectItems,
java.lang.Iterable<?> items)
UISelectItems component that uses the var iterator construct to generate
a list of SelectItems.uiSelectItems - items - facesContext - SelectItem obtained from the given parameters