h:selectOneMenu required=“true” reverts to bean value on validation failure
问题 I have something like this on a create/edit form: <h:selectOneMenu value="#{bean.value}" required="true" ... > <f:selectItem itemLabel="-- Select --" itemValue=""/> <f:selectItems .../> </h:selectOneMenu> In the create new object case, the required validation works as expected. In the edit object case, if I change a valid value to the placeholder "-- Select --", I get the validation failure w/expected requiredMessage because itemValue is blank (""); however , the HTML <select> reverts to