The o:selectItemGroups is an extension of UISelectItems which allows you to iterate over a nested collection representing groups of
select items. This is basically the UIComponent counterpart of jakarta.faces.model.SelectItemGroup.
Below example assumes a List<Category> as value wherein Category in turn has a List<Product>.
<h:selectOneMenu value="#{bean.selectedProduct}" converter="omnifaces.SelectItemsConverter">
<f:selectItem itemValue="#{null}" />
<o:selectItemGroups value="#{bean.categories}" var="category" itemLabel="#{category.name}">
<f:selectItems value="#{category.products}" var="product" itemLabel="#{product.name}" />
</o:selectItemGroups>
</h:selectOneMenu>
| Info | Value |
|---|---|
| Component Type | org.omnifaces.component.model.SelectItemGroups |
| Handler Class | None |
| Renderer Type | None |
| Description | None |
| Name | Required | Type | Description |
|---|---|---|---|
binding | false | jakarta.el.ValueExpression
(must evaluate to jakarta.faces.component.UIComponent)
| The ValueExpression linking this component to a property in a backing bean. |
id | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| The component identifier for this component. This value must be unique within the closest parent component that is a naming container. |
itemLabel | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| The label of the select item group. Defaults to the String representation of itemValue. |
itemValue | false | jakarta.el.ValueExpression
(must evaluate to java.lang.Object)
| The value of the select item group. This will be exposed to any nested UISelectItem(s) children. Defaults to the currently iterated select item group. |
rendered | false | jakarta.el.ValueExpression
(must evaluate to boolean)
| Flag indicating whether or not this component should be rendered (during Render Response Phase), or processed on any subsequent form submit. The default value for this property is true. |
value | true | jakarta.el.ValueExpression
(must evaluate to java.lang.Object)
| No Description |
var | false | jakarta.el.ValueExpression
(must evaluate to java.lang.String)
| The name of the EL variable which exposes the currently iterated select item group. Defaults to item. |
Output generated by Vdldoc View Declaration Language Documentation Generator.