I have got a selectOnemenu with selectItems populated from an Enum - CodeTyeEnum.
If a code is already saved then the dropdown should default to that code, if no code is saved for that Period a 'Please Select' will be the default value.
Currently what happens is the first time I enter the screen for a Period if the saved code is 'N' then the default value selected and highlighted is 'N'.
If I go back and re enter the screen for a Period with saved code X it is still highlighting 'N' instead of 'X', can anyone see what the issue is?
I am not seeing any value attribute for <h:selectOneMenu /> tag, without the value attribute how come the controller will hold the previously selected values which is already saved.
try to use value attribute and map it to the backing bean which will retrieve the value from the backend that is already saved, if nothing is there empty will be return.