The 'property' attribute of the select tag is the form property submitted. You don't need to use the name property in the select tag, it's used there to indicate which bean to get a value from in order to pre-select an item in the options.
Try this: <html:select property="nombre"> <html:options collection="cargo" property="codigo" labelProperty="nombre"/> </html:select> or <html:select property="nombre"> <html:optionsCollection name="cargo" value="codigo" label="nombre"/> </html:select> If you do want to pre-select an option add the 'value' attribute to the select tag. Greg -----Original Message----- From: carlos manuel llona aris [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 01, 2003 2:07 PM To: [EMAIL PROTECTED] Subject: Re: problem using html:select the problem is that now using the combo I cant obtein the value selected when I submit - the user form cant recive the value, and I dont know why!! I dont know how to connect my combobox with one variable of the user form, before I used the atribute property using a hmlt:text, now I dont know how to match :( >From: [EMAIL PROTECTED] >Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >To: "Struts Users Mailing List" <[EMAIL PROTECTED]> >Subject: Re: problem using html:select >Date: Wed, 1 Oct 2003 12:46:10 -0400 > >What is the error message you are getting? > > >----- Original Message ----- >From: "Carlos Llona" <[EMAIL PROTECTED]> >To: <[EMAIL PROTECTED]> >Sent: Wednesday, October 01, 2003 11:57 AM >Subject: problem using html:select > > > > Hello: > > > > This is my litle problem > > > > I make a sample in struts that register data from the users, this > > data is save in one table ("Users"), the JSP have a field > > call "Cargo" (I'm from southamerica - cargo is like a ocupation), in > > this field the user enter the ocupation manualy, but now I want that > > the user select the Cargo(ocupation - this ocupations are in another > > table) from a combo, I can show the combobox with the data from de > > table ocupations using a bean and the tag html:select. > > > > <jsp:useBean id="cargo" class="beans.Cargos" scope="request"/> > > > > <html:select name='cargo' property="nombre" > > > <html:option value="0">--select--</html:option> > > <html:optionsCollection name='cargo' label='nombre' > > value='codigo' property='cargos' /> > > </html:select> > > > > but now I cant recive tha value selected in the combo in my User > > form. I think that the problem was the value of the atribute property > > of tha select tag, but when i change the value of the property > > entering a name of the variable for my user form occurs a error, > > because property just accept the name of a variable of my Cargo bean. > > > > Whats is the problem with this??? > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > _________________________________________________________________ ¿Estás buscando un auto nuevo? http://www.yupimsn.com/autos/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]