Can a default value “Select One ” be set to SelectOneMenu component after a validation error in the phase listener afterPhase() method?
Right now if the default value “Select One” is selected and form is submitted
<h:selectItem itemLabel="Select One" itemValue=""/>
The select one menu value is changed to previously valid value.
You need to make the item value non-empty (and non-null!) and set the
noSelectionOptionattribute totrue.(and fix the
h:selectItemto bef:selectItem)