I have a selectonemenu defined like this:
Code: Select all
<p:selectOneMenu id="chair" value="#{setupSystemController.conference.conferenceChair}" style="margin-bottom:10px;" >
<f:converter converterId="staffConverter"/>
<p:ajax event="valueChange" update="chairEmail"/>
<f:selectItem itemLabel="Select Conference chair" itemValue="" />
<f:selectItems value="#{setupSystemController.staff}" var="staff"
itemLabel="#{staff.firstName} #{staff.lastName}" itemValue="#{staff}" />
</p:selectOneMenu>
I have tried to copy the basic selectonemenu from PF demo:
Code: Select all
<p:selectOneMenu id="option" value="#{selectOneMenuView.selectedOption}">
<f:selectItem itemLabel="Select One" itemValue=""/>
<f:selectItem itemLabel="Option1" itemValue="Option1"/>
<f:selectItem itemLabel="Option2" itemValue="Option2"/>
<f:selectItem itemLabel="Option3" itemValue="Option3"/>
<f:facet name="footer">
<p:divider styleClass="p-mt-0" />
<h:outputText value="3 options" style="font-weight:bold;"/>
</f:facet>
</p:selectOneMenu>
and the same happens in my code - the default 'Select One' disappear but it works as expected in the demo.
I'm running Serenity 3.0.1 and when I run the live demo
https://www.primefaces.org/serenity/input.xhtml
it does exactly the same - default value is removed when a drop down value is selected.
Is that intentionally in Serenity?
Kim