我想使用来自primefaces 展示页面的示例来对selectOneMenu中的selectItems进行分组:
<h:outputText value="Grouping: " />
<p:selectOneMenu value="#{formBean.car}">
<f:selectItem itemLabel="Select One" itemValue="" />
<f:selectItems value="#{formBean.cars}" />
</p:selectOneMenu>
我的问题是,缺少bean的实现。现在我不知道如何在方法getCars()内实现selectItems的分组。我找不到其他的示例。