I'm using Serenity 2.0.1 and Primefaces 7.0 and I've been enjoying them thoroughly in my project for the past 6 months. However, I've had some issues with p:selectonemenu...
The following code works great:
Code: Select all
<div class="ui-g">
<h:form>
<div class="ui-g-12">
<p:selectOneMenu value="#{MyBean.selectedItem}" converter="ItemConverter">
<f:selectItem noSelectionOption="true" itemLabel="Select an item"/>
<f:selectItems value="#{MyBean.itemList}" var="item" itemLabel="#{item.label}" itemValue="#{item}" />
</p:selectOneMenu>
</div>
</h:form>
</div>
Code: Select all
<div class="ui-g">
<h:form>
<div class="ui-g-12">
<h:panelgroup styleclass="md-inputfield">
<p:selectOneMenu value="#{MyBean.selectedItem}" converter="ItemConverter">
<f:selectItem noSelectionOption="true" itemLabel="Select an item"/>
<f:selectItems value="#{MyBean.itemList}" var="item" itemLabel="#{item.label}" itemValue="#{item}" />
</p:selectOneMenu>
</h:panelgroup>
</div>
</h:form>
</div>
This is true both inside and outside a p:dialog, so it isn't related to the similar post: viewtopic.php?f=73&t=57847.
My workaround is to have an extra f:selectItem that is sacrificed to the Primefaces gods, appeasing their wrath and sparing the selectitems I need to render.
Is this a common issue or is my environment somehow jinxed?
Cheers