Thanks Wendy! My problem was the following. In order to get this <select> to display, I of course needed to set up all the crap asociated with doing such a thing... This is a list partially to get it into the archives so I can search on it later.
So, I did the following 1. Loaded an ArrayList of CodeBean objects onto the application context at application startup (inder the name "codes". (a CodeBean has a codeID and codeName attribure with getters and setters) I actualyl rethought the way I was saving data in the application context, and an ArrayList of code beans seemed nicer than a hashMap.. so I changed it. 2. create the HTML for it all to work <html:form action="codeAction.do" method="post"> <html:select name="codeForm" property="codeName"> <html:options collection="codes" property="codeID" labelProperty="codeName"/> </html:select> </html:form> WELL, in order for th above to work, you need a form-bean entry, and an action mapping, and for that to work, you need a Form Bean and an Action Class >From Struts-Config.xml.... <form-beans> <form-bean name="codeForm" type="com.company.struts.form.CodeForm"/> </form-beans> ...and... <action path="/CodeAction" name="sicForm" scope="request" input="page.input" type="com.company.struts.CodeAction"> <forward name="success" path="page.result" redirect="true" /> </action> My apologies, but I thought it might help reinforce it in my mind if I wrote it all down. Thanks for the help Wendy! On Mon, 07 Mar 2005 09:48:35 -0700, Wendy Smoak <[EMAIL PROTECTED]> wrote: > From: "David Johnson" <[EMAIL PROTECTED]> > > I simply want to create a select box containing all the items in my > > HashMap (displaying the codeName but passing the codeID) > > What's the easiest way to do this? Can I do this wil just a vanilla > > HashMap? The examples are slightly confusing. > > I agree... I can never figure out what combination of tag attributes will do > what I want just from reading the docs. Here's an example from a working > webapp: > > <html-el:select property="type"> > <html-el:options collection="contactTypes" > property="key" > labelProperty="value"/> > </html-el:select> > > -- > Wendy Smoak > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- -Dave [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]