public final class SelectItemsCollector extends Object
SelectItem
instances from various sources.Modifier and Type | Method and Description |
---|---|
static List<SelectItem> |
collectFromParent(FacesContext context,
UIComponent parent)
This method gets all select items that are expressed via
UISelectItem or UISelectItems
children of the given parent component. |
static List<SelectItem> |
collectFromUISelectItemsIterator(FacesContext facesContext,
UISelectItems uiSelectItems,
Iterable<?> items)
This method runs the algorithm expressed by a
UISelectItems component that uses the var iterator construct to generate
a list of SelectItem s. |
public static List<SelectItem> collectFromParent(FacesContext context, 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
- The involved faces context.public static List<SelectItem> collectFromUISelectItemsIterator(FacesContext facesContext, UISelectItems uiSelectItems, Iterable<?> items)
UISelectItems
component that uses the var
iterator construct to generate
a list of SelectItem
s.uiSelectItems
- The involved select items component.items
- The available select items.facesContext
- The involved faces context.SelectItem
obtained from the given parametersCopyright © 2012–2015 OmniFaces. All rights reserved.