You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Carlos Llona <cl...@hotmail.com> on 2003/10/01 17:57:38 UTC
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org
Re: problem using html:select
Posted by de...@betterway.net.
What is the error message you are getting?
----- Original Message -----
From: "Carlos Llona" <cl...@hotmail.com>
To: <st...@jakarta.apache.org>
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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org