I have a selectOneMenu that contains a list of entities. When selecting an entry in the list and submitting the form, the selected entity will be set as a reference in another entity (i.e., the entity we are editing).
Now, if I want to clear this reference using the selectOneMenu, how would I do then? Currently, my JSF-page looks like this:
<h:selectOneMenu value="#{edt.workShift}" styleClass="thinSelectMenu" required="false" rendered="#{emt.editMode}" > <s:convertEntity /> <s:selectItems value="#{workShifts}" var="workShift" label="#{workShift.name}" noSelectionLabel="-"/> </h:selectOneMenu>
Set it back to the "noSelectionLabel" - that sets #{edt.workShift} to null