Package de.xima.fc.gui.model
Class SelectItemData<T>
- java.lang.Object
-
- de.xima.fc.gui.model.SelectItemData<T>
-
- Type Parameters:
T- The type of the value of the select item.
- All Implemented Interfaces:
Serializable
public final class SelectItemData<T> extends Object implements Serializable
Data of aSelectItemthat is located somewhere inside a (possibly nested) tree ofSelectItemGroups. Contains all data from the select item, as well as a list of the labels of all parent groups, starting with the outermost group and ending with the innermost group.- Since:
- 8.5.4
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)static List<SelectItemData<?>>forFlattenedSelectItems(Iterable<? extends javax.faces.model.SelectItem> items)Creates a flattened list of select item data for all select items in the given iterable, including all select items nested inside select item groups.static SelectItemData<?>forSelectItem(javax.faces.model.SelectItem item, Collection<String> groupNames)Creates select item data for the given select item and group names.SelectItemStatusgetStatus()Gets the status of the select item, which contains all metadata from the select item (except for the value).TgetValue()Gets the value of the select item.inthashCode()
-
-
-
Method Detail
-
getStatus
public SelectItemStatus getStatus()
Gets the status of the select item, which contains all metadata from the select item (except for the value).- Returns:
- The status of the select item.
-
getValue
public T getValue()
Gets the value of the select item.- Returns:
- The value of the select item.
-
forFlattenedSelectItems
public static List<SelectItemData<?>> forFlattenedSelectItems(Iterable<? extends javax.faces.model.SelectItem> items)
Creates a flattened list of select item data for all select items in the given iterable, including all select items nested inside select item groups. The group names of all parent groups are included in the resulting select item data asSelectItemStatus.getGroupNames(). If a value filter is provided, only select items whose value matches the filter are included in the result.- Parameters:
items- The select items to flatten.- Returns:
- A flattened list of select item data for all select items.
-
forSelectItem
public static SelectItemData<?> forSelectItem(javax.faces.model.SelectItem item, Collection<String> groupNames)
Creates select item data for the given select item and group names.- Parameters:
item- The select item to create the data for.groupNames- The group names of all parent groups that contain the select item, starting with the outermost group and ending with the innermost group. If the select item is not located inside any group, this list should be empty.- Returns:
- Select item data for the given select item and group names.
-
-