I hadn’t used the Spring form tag library before and decided to give it a shot for a small test form I was creating. I am using a subclass of SimpleFormController to return a simple list of value/name pairs from a database call to populate a select/option list in the HTML. I figured it would be easy enough to return an ArrayList as my command object and that is populated with HashMaps of the key/values. Oops. Doesn’t work.
It appears that I have to create an object that holds the list (or maybe a list of objects with fields that are the items I need displayed in the select dropdown). It’s too bad that I can’t do it the way I want with that tag library 😉 Since this is a throw away screen though (I suppose the controller is as well) I’m not going to worry too much about it 🙂