This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
Sun Certified Java Programmer with 93 percent
Joined: Jun 17, 2010
Thanks that was the issue
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: <h:selectOneMenu issue defaulting to specific selectItem