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 am filling list boxes with data from a database. Nothing new there. But it seems really messy the way I am doing it now. I have a list that holds a list of hardware items (motherboard, harddrive, etc). I am using Hibernate so this is my method to retrieve my list:
This return a java.util.List of Hardware objects. I return that list to one of my backing beans and in order to fill the list I have this method: